This does the same thing that the command 'j_melis' submitted, but does it a lot quicker. That command takes 43 seconds to complete on my system, while the command I submitted takes 6 seconds. Show Sample Output
Says time every 5 seconds in hours, minutes and seconds using festival.
Echoes text horizontally centralized based on screen width
Let's you examine, for example, whether infrastructure folks really provisioned the correct setup.
Java 64-bit checklist
1. check if hardware is 64-bit capable by looking for lm flag
grep -l 'flags.*\<lm\>' /proc/cpuinfo
2. check if kernel is 64-bit
getconf LONG_BIT | grep '64'
3. check if java is 64-bit (simply look for 64-bit in output - if present, then it is, if absent, then it is 32-bit)
java -version
Show Sample Output
Example : ./netvibes http://feeds.feedburner.com/Command-line-fu http://feeds.gawker.com/lifehacker/full OR: Add the netvibes rss reader to subscriptions options on your browser (if you will choose this bash script file as an rss reader app)
This command crawls a domain with the typical WGET output. It logs every thing to a WGET-LOG file with any errors repeated at the end. It also had the added benefit of not flooding your terminal without ouput, so it is safe to run in the background.
Music Library Convert Usage lc Old_Directory New_DIrectory Old_Format New_Format lc ~/Music ~/Music_ogg mp3 ogg This will convert all audio files in the old directory to the new directory from the old format to the new format. It will leave the original library alone. The converted library will retain folder structure.
aha (https://github.com/theZiz/aha) is a program to convert ANSI escape sequence of a unix terminal to HTML code. wkhtmltoimage is a program to convert html file to image file. This one-liner will convert text file to image file, and set the image file as wallpaper by feh without temporary file.
Read a file or standard input and only outputs lines that start with a dot or period "." Show Sample Output
I had some trouble removing empty lines from a file (perhaps due to utf-8, as it's the source of all evil), \W did the trick eventually.
It is not uncommon to receive an error "Too many open files", this command allows you to change the limit for a user. This can be put into /etc/profile so that all users will have this change.
I was previously unaware of the -v switch. As a result I never got specifics about which interfaces the allowed or dropped applied to. Thought I'd share the wealth... FYI, -n prevents DNS resolving of IPs.
Join all sequentially named files in the directory. Use this for files split by utilities like hjsplit and similar. This command does not do/perform _any_ sanity checks before acting, except that it won't run unless there is a file that matches "*.001". - The outfile should not already exist. - There should be more than one file. (*.002 should exist as well as *.001) - The file-count should match the number in the name of the last file in the series. - None of the files should be empty. - All files should be the same size, except for the last, which should usually be smaller, but never larger than the rest. A safer altenative can be found here: http://pastebin.com/KSS0zU2F
Uses printf command to resize terminal. So far, this is tested to NOT work in Konsole. Works with Mac Terminal, XFCE Terminal, XTerm, gnome-terminal.
This command removes *.lock or files from a folder.
Avoids cat abuse ;)
You may have to disable fortran and openmp using the USE variable too. YMMV.
Displays memory usage for individual instances of an application that spawns multiple instances of itself. This command also works on single process applications. Show Sample Output
When you run a lot of containers the built in docker ps output becomes unreadable. This command formats the output to be easier on the eyes. Requires q (https://github.com/harelba/q) text as data. Show Sample Output
this command can be added to crontab so as to execute a nightly backup of directories and store only the 10 last backup files.
This command summarizes the disk usage across the files and folders in a given directory, including hidden files and folders beginning with ".", but excluding the directories "." and ".." It produces a sorted list with the largest files and folders at the bottom of the list Show Sample Output
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.
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
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: