Check These Out
Can be used for other commands as well, replace rm with ls.
It is easy to make this shorter but if the filenames involved have spaces, you will need to do use find's "-print0" option in conjunction with xargs's "-0" option. Otherwise the shell that xargs uses to execute the "rm" command line will treat the space as a token separator, thereby treating the name as two (or more) names.
I used it for this function, which prints hashes:
function liner {
num_lines=${1:-42}
echo
printf %${num_lines}s|tr " " "#"
echo
}
Note the colon-dash, instead of the usual colon-equals.
Files containing ascii art (e.g. with .nfo extension) are typically not correctly reproduced at the command line when using cat. With iconv one can easily write a wrapper to solve this:
$ #!/bin/bash
$ if [ -z "$@" ]; then echo "Usage: $(basename $0) file [file] ..."
$ else iconv -f437 -tutf8 "$@"; fi
$ exit 0
You can substitute /home/$USER with any path you like.
Using this command you can track a moment when usb device was attached.
Changes the wallpaper to the last satellite image.
Tha url above shows latin america. Seek the best url for your location
Now I have a usefull background image in my desktop
I use it inside kalarm updating every 15 minutes. May be done with 'watch' instead
It s an option to xplanet ( kde ) and xearth
needs xli , curl
These are my favourite switches on pwgen:
-B Don't include ambiguous characters in the password
-n Include at least one number in the password
-y Include at least one special symbol in the password
-c Include at least one capital letter in the password
It just works!
Add a number to set password length, add another to set how many password to output. Example:
pwgen -Bnyc 12 20
this will output 20 password of 12 chars length.
Restarts the XAPI service on the host, mostly used by Xen Center. It does not affect any running VMs, just the Xen client tools that may be connected. On my list as XAPI frustratingly keeps running out of memory and getting killed off.
Even faster without the need for cut... :)