Commands by shaiss (3)

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


    12
    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

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"

SSH connection through host in the middle; with key redirection
This command uses the reachable_host as a proxy; redirecting your request to the unreachable_host. The main advantage is that you need only one ssh key. You copy the public part to both servers and you can access the unreachable_host without a problem. Also, you can put this on ~/.ssh/config to access the unreachable_host directly: # config unreachable_host ProxyCommand ssh user@reachable_host -W %h:%p and, then, just ssh user@unreachable_host.

Welcome humans!
Some information about robots. :-)

print character classes
Today I needed a way to print various character classes to use as input for a program I was writing. Also a nice way to visualize character classes.

converting horizontal line to vertical line

Count the number of pages of all PDFs in current directory and all subdirs, recursively

Inverted cowsay
It's quite fun to invert text using "flip.pl" (ref: http://ubuntuforums.org/showthread.php?t=2078323 ). Slightly more challenging is to flip a whole "cowsay". :-)

Find dead symbolic links
-L tells find to follow symbolic links, so -type l will only return links it can't follow (i.e., those that are broken).

Install pip with Proxy
Installs pip packages defining a proxy

list files recursively by size


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: