Commands using perl (369)

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

How to remove an ISO image from media database

List only directories, one per line

An alias to select a portion of your desktop and save it as an image.

Check a server is up. If it isn't mail me.
This version uses netcat to check a particular service.

Remove security limitations from PDF documents using ghostscript (for Windows)
#4345 also works under windows

Symlink all files from a base directory to a target directory
Symlinks all files in the base directory to the target directory then lists all of the created symlinks.

sort the output of the 'du' command by largest first, using human readable output.
In this case I'm just grabbing the next level of subdirectories (and same level regular files) with the --max-depth=1 flag. leaving out that flag will just give you finer resolution. Note that you have to use the -h switch with both 'du' and with 'sort.'

Convert CSV to JSON
Replace 'csv_file.csv' with your filename.

Copy a file using pv and watch its progress
pv allows a user to see the progress of data through a pipeline, by giving information such as time elapsed, percentage completed (with progress bar), current throughput rate, total data transferred, and ETA. (man pv)

create a temporary file in a command line call
Sometimes you have a script that needs and inputfile for execution. If you don't want to create one because it may contain only one line you can use the `


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: