Commands by shaiss (3)

  • Get all the networking related commands for your distro Show Sample Output


    13
    apropos network |more
    shaiss · 2009-09-25 15:05:33 1
  • I find this format easier to read if your going through lots of files. This way you can open the file in any editor and easily review the file


    1
    grep -lir "sometext" * > sometext_found_in.log
    shaiss · 2009-08-31 23:48:45 0
  • Ever need to output an entire directory and subdirectory contents to a file? This is a simple one liner but it does the trick every time. Omit -la and use only -R for just the names


    -5
    ls -laR > /path/to/filelist
    shaiss · 2009-08-12 17:53:40 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

create dir tree
create tree of dir's in one command

Create a 5 MB blank file via a seek hole
Similar to the original, but is much faster since it only needs to write the last byte as zero. A diff on testfile and testfile.seek will return that they are the same.

Flush and then immediately start watching a file
This is useful for keeping an eye on an error log while developing. The !^ pulls the first arg from the previous command (which needs to be run in a sub-shell for this shortcut to work).

Console clock
Shows a simple clock in the console -t param removes the watch header Ctrl-c to exit

Show the UUID of a filesystem or partition
Show the UUID-based alternate device names of ZEVO-related partitions on Darwin/OS X. Adapted from the lines by dbrady at http://zevo.getgreenbytes.com/forum/viewtopic.php?p=700#p700 and following the disk device naming scheme at http://zevo.getgreenbytes.com/wiki/pmwiki.php?n=Site.DiskDeviceNames

Install pip with Proxy
Installs pip packages defining a proxy

Rename files in batch

Random quote from Borat -- no html parsing
Turns out smacie.com has a text file containing every single one of the borat quotes, each one on a newline. This makes it very convenient, as this can be done without any sed-parsing, and uses less bandwitdth! Note that borate quotes are quite offensive, much more so than "fortunes-off"!

Remove invalid host keys from ~/.ssh/known_hosts
Useful if you have to tunnel ssh through a local port and it complains of the host key being different. Much easier than manually editing the file.

Print your cpu intel architecture family


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: