Commands using cut (586)

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

Use the arguments used in the last command
Very basic, but who knows.. mkdir !$ should work too, only uses 'the last' argument. !-2 executes cd Desktop/Notes again. More tips in 'man history'

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"

rapidshare download script in 200 characters

Alternative for basename using grep to extract file name
Here's a bash version.

Convert a string to

How much RAM is Apache using?
Display the amount of memory used by all the httpd processes. Great in case you are being Slashdoted!

rename anime fansubs
renames Anime Episodes to files, that can be parsed by sonarr & co

IBM AIX: Extract a .tar.gz archive in one shot
This command is for UNIX OSes that have plain vanilla System V UNIX commands instead of their more functional GNU counterparts, such as IBM AIX.

Syntax Highlight your Perl code
This uses Text::Highlight to output the specified Perl file with syntax highlighting. A better alternative is my App::perlhl - find it on the CPAN: http://p3rl.org/App::perlhl

list all file-types (case-insensitive extensions) including subdirectories


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: