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
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.
Show the maximum amount of memory that was needed by a process at any time. My use case: Having a long-running computation job on $BIG_COMPUTER and judging whether it will also run on $SMALL_COMPUTER.
http://man7.org/linux/man-pages/man5/proc.5.html
VmHWM: Peak resident set size ("high water mark")
Even faster without the need for cut... :)