Commands by Velenux (4)

  • smbfs or cifs, depends on which you are using


    -2
    umount -t smbfs
    Velenux · 2012-02-23 10:46:44 0

  • -6
    for file in *; do echo $PWD/$file; done
    Velenux · 2011-12-16 13:12:00 1
  • Best way I know to get rid of .bash_history and don't allow bash to save the current one on exit Edit: added ~/ before .bash_history, just in case... ;)


    -5
    rm ~/.bash_history && kill -9 $$
    Velenux · 2009-10-08 12:25:47 2
  • Output is from Debian Lenny Show Sample Output


    1
    grep CONFIG $(which mysqlbug)
    Velenux · 2009-09-23 17:12:37 0

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands


Check These Out

dmesg with colored human-readable dates
Use sed to color the output of a human-readable dmesg output

Convert seconds to [DD:][HH:]MM:SS
Converts any number of seconds into days, hours, minutes and seconds. sec2dhms() { declare -i SS="$1" D=$(( SS / 86400 )) H=$(( SS % 86400 / 3600 )) M=$(( SS % 3600 / 60 )) S=$(( SS % 60 )) [ "$D" -gt 0 ] && echo -n "${D}:" [ "$H" -gt 0 ] && printf "%02g:" "$H" printf "%02g:%02g\n" "$M" "$S" }

ignore .DS_Store forever in GIT
With a couple of little commands, you?ll be able to ignore the .DS_Store files forever from your git repositories on mac! The following command will add the .gitignore file to the git configuration git config --global core.excludesfile ~/.gitignore then, the following, will add the .DS_Store to the list echo .DS_Store >> ~/.gitignore

convert a mp4 video file to mp3 audio file (multiple files)

list block devices
Shows all block devices in a tree with descruptions of what they are.

Rotate a pdf by 90 degrees CW

Which processes are listening on a specific port (e.g. port 80)
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"

temporarily override alias of any command
say, someone has aliased ls to 'ls --color=always' and you want to temporarily override the alias (it does not override functions)

Replace duplicate files by hardlinks

Calculate N!


Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: