Commands tagged perl (190)

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

Real full backup copy of /etc folder
Yes, rsync(1) supports local directories. And, should anything change, it's trivial to run the command again, and grab only the changes, instead of the full directory.

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

List apache2 virtualhosts
Lists virtualhosts currently enabled for apache2, showing the ServerName:port, conf file and DocumentRoot

list files recursively by size

Displays process tree of all running processes
G - uses VT100 line drawing a - shows command line arguments of process p - prints PID of process For other options, man pstree :)

Open multiple tabs in Firefox from a file containing urls
this will open a new tab in firefox for every line in a file the sleep is removable but i found that if you have a large list of urls 50+, and no sleep, it will try to open all the urls at once and this will cause them all to load a lot slower, also depending on the ram of your system sleep gives you a chance to close the tabs before they overload your ram, removing & >2/dev/null will yield unpredictable results.

Remove executable bit from all files in the current directory recursively, excluding other directories
Useful if you have copied files from an OS without a permission structure (for example, DOS) and you need to disable all executable files but want to be able to descend into your directories.

Get the SUM of visual blocked digits in vim

Run a command for a given time
or "Execute a command with a timeout" Run a command in background, sleep 10 seconds, kill it. $! is the process id of the most recently executed background command. You can test it with: find /& sleep10; kill $!

Convert multiple pdf's to jpg in linux using the convert command


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: