Commands by enrique (1)

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

Rename HTML files according to their title tag
The above one-liner could be run against all HTML files in a directory. It renames the HTML files based on the text contained in their title tag. This helped me in a situation where I had a directory containing thousands of HTML documents with meaningless filenames.

Quickly batch resize images
-geometry (preserves values of height and width given, and aspect ratio). WARNING: While 'resize' creates resized copies of original files, 'mogrify' works on the original files, replacing them. It will overwrite the source files, use with caution, and backup regularly.

Use GNU info with a pager
This makes GNU info output menu items recursively and pipe its contents to less, allowing one to use GNU info in a manner similar to 'man'.

Show word-by-word differences between two latex files, in color

Find the package that installed a command

Mount a windows partition in a dual boot linux installation with write permission...[Read and Write]
If you have the library installed ntfs-3g, you will be able to mount the windows partition and write on it....

Generate an XKCD #936 style 4 word passphrase (fast)
Some snippets posted are slow on big dictionaries, this one is fast.

perl one-liner to get the current week number
Not perl but shorter.

Calculate days on which Friday the 13th occurs
Simply change the years listed in the first seq, and it will print out all the months in that span of years that have Friday the 13ths in them.

strips the first field of each line where the delimiter is the first ascii character


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: