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:
Sometimes you unzip a file that has no root folder and it spews files all over the place. This will clean up all of those files by deleting them.
Helps if you accidentally deleted files from an svn repo with plain rm and you would like to mark them for svn to delete too.
It does not work without the verbose mode (-v is important)
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