All commands (14,187)

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

Get and read log from remote host (works with log on pipe, too)

Delete files older than..
This command will delete files i a given path (/dir_name) , which older than given time in days (-mtime +5 will delete files older than five days.

Binary injection
Replace (as opposed to insert) hex opcodes, data, breakpoints, etc. without opening a hex editor. HEXBYTES contains the hex you want to inject in ascii form (e.g. 31c0) OFFSET is the hex offset (e.g. 49cf) into the binary FILE

a function to find the fastest DNS server
http://public-dns.info gives a list of online dns servers. you need to change the country in url (br in this url) with your country code. this command need some time to ping all IP in list.

rename all jpg files with a prefix and a counter

Mount iso to /mnt on Solaris
Unmount $ umount /mnt Delete loopback file device $ lofiadm -d /dev/lofi/1

List all global top level modles, then remove ALL npm packages with xargs

Go up multiple levels of directories quickly and easily.

Synchronise a file from a remote server
You will be prompted for a password unless you have your public keys set-up.

Open Sublime-text in current directory


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: