Check These Out
Changes your desktop background image in gnome. Update the directory to wherever you keep your wallpapers. I like to create a sub-directory in my Wallpaper folder called "cycle" that I use to define the wallpapers I wish to loop in cron. ex:
$ gconftool-2 -t str -s /desktop/gnome/background/picture_filename "$(find ~/Wallpapers/cycle -type f | shuf -n1)"
Using this command you can track a moment when usb device was attached.
-f file(s) to be monitorized
-n number of last line to be printed on the screen
in this example, the content of two files are displayed
This is useful if you add sid, install some packages, then remove sid and want to work out which packages you installed from sid that should be removed (e.g. before an upgrade to the new stable). Alternatively you can think of this as "find installed packages that can no longer be installed."
or "Execute a command with a timeout"
Run a command in background, sleep 10 seconds, kill it.
$! is the process id of the most recently executed background command.
You can test it with:
find /& sleep10; kill $!
Clone a root partition. The reason for double-mounting the root device is to avoid any filesystem overlay issues. This is particularly important for /dev.
Also, note the importance of the trailing slashes on the paths when using rsync (search the man page for "slash" for more details). rsync and bash add several subtle nuances to path handling; using trailing slashes will effectively mean "clone this directory", even when run multiple times. For example: run once to get an initial copy, and then run again in single user mode just before rebooting into the new disk.
Using file globs (which miss dot-files) or leaving off the trailing slash with rsync (which will create /mnt/target/root) are traps that are easy to fall into.
This is a kind of wrapper around the shell builtin cd that allows a person to quickly go up several directories.
Instead of typing:
cd ../..
A user can type:
cd ...
Instead of:
cd ../../..
Type:
cd ....
Add another period and it goes up four levels. Adding more periods will take you up more levels.
% selects every line in the file. 'd' deletes what's selected. It's a pretty simple combination.