Check These Out
This command takes the content of a Parcellite-managed clipboard manager and add one level of indentation to it. It may be useful to indent a block of code which will enter inside another, already indented one but I use it mostly to indent code I will post in Stack Overflow questions and answers.
Rotates log files with "gz"-extension in a directory for 7 days and enumerates the number in file name.
i.e.: logfile.1.gz > logfile.2.gz
I needed this line due to the limitations on AIX Unix systems which do not ship with the rename command.
Tested in Debian, ymmv.
- c 1 : send only one ping;;
-W 1: wait for one second and then exit ping, assuming target IP is not available; change as needed (-W 0.5 for half a second, smaller or greater value depending on network speed/latency)
rather don't depend on those sleepin'pills
http://en.wikipedia.org/wiki/Counting_sheep
If you want a password length longer than 6, changing the -c6 to read -c8 will give you 8 random characters instead of 6. To end up with a line-feed, use this with echo:
# echo `< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c6`
Modern systems need higher strenght, so add some special characters:
# < /dev/urandom tr -dc '12345!@#$%qwertQWERTasdfgASDFGzxcvbZXCVB' | head -c8
This should automatically mount it to /media/truecrypt1. Further mounts will go to /media/truecrypt2, and so on. You shouldn't need sudo/su if your permissions are right.
I alias tru='truecrypt' since tr and true are commands.
To explicitly create a mount point do: tru volume.tc /media/foo
To make sure an GUI explorer window (nautilus, et al) opens on the mounted volume, add: --explorer
To see what you currently have mounted do: tru -l
To dismount a volume do: tru -d volume.tc. To dismount all mounted volumes at once do: tru -d
Tested with Truecrypt v6.3a / Ubuntu 9.10
This will take the packages matching a given `apt-cache search` query (a collection of AND'd words or regexps) and tell you how popular they are. This is particularly nice for those times you have to figure out which solution to use for e.g. a PDF reader or a VNC client.
Substitute "ubuntu.com" for "debian.org" if you want this to use Ubuntu's data instead. Everything else will work perfectly.
This will list the files in a directory, then zip each one with the original filename individually.
video1.wmv -> video1.zip
video2.wmv -> video2.zip
This was for zipping up large amounts of video files for upload on a Windows machine.
move filename/rename filenames with Uppercase to lowercase in current directory