commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
Use the command to create a script and bind it to a key using keyboard shortcut.
Script locks the screen in a loop until the command is executed again.At first it
Deletes unneeded files after every step and allows to use a color other than yellow at the last position.
Removes all files in the current folder that are 1400 bytes in size.
I wanted to play a song from the shell and get the shell back, I also dont want to store the file if it is not needed.
edit, not sure if I need to mention it... killall vlc to stop it
If you just try rm -i, the file name will be interpreted as a command line switch. Many commands let you use a double hyphen '--' to say 'No more switches, the rest are file names'.
Incidentally having a file named '-i' in a directory where you use rm * will cause rm to act as if you specified '-i' on the command line.
vim -- -v
touch -- -t
cat -- -c
Sometimes, it is annoying to find your files or directories missing. If you want to log all the rm commands you can put this in /etc/profile.
A safer way to block adobe and macromedia flash tracking and spyware
Appropriate for today.
Removes all png files whose geometry is not 280x190 pixels
rm -rf .* matches ".." and thus one goes up a level and wipes out more than intended.
In bash, .??* safely accomplishes what one intends - remove those .files
The ? matches most characters except "/", thus .?? does not match ../ and so one is safe.
Deletes capistrano-style release directories (except that there are dashes between the YYYY-MM-DD)
Removing sensitive data