Commands by mohan43u (13)

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

prints the parameter you used on the previous command

Create a tar of directory structure only
The original suggestion did not work for me, when operating on folders located on an external mount (ie other than the root device) in Ubuntu. A variation using xargs does the trick.

Human readable directory sizes for current directory, sorted descending

Short one line while loop that outputs parameterized content from one file to another
There is a common command for outputting a field or list of fields from each line in a file. Why wouldn't you just use cut?

Colorful man
That command installs "most" and make this command as the default man reader. The "most" works like "less" (the current man reader), but it render colors for manpages and may do more things. Read "man most". You can see a preview here: http://www.dicas-l.com.br/dicas-l/20090718.php

Traceroute w/TCP to get through firewalls.
man tcptraceroute

Find the package that installed a command

Using NMAP to check if a port is open or close
Using NMAP to check to see if port 22(SSH) is open on servers and network devices.

Transcode .flac to .wav with gstreamer
Takes all .flac directories, feeds them into a simple transcode pipeline to spit out .wavs with the same name (but correct extension).

Downsample mp3s to 128K
This will lower the quality of mp3 files, but is necessary to play them on some mobile devices.


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: