All commands (14,187)

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

make, or run a script, everytime a file in a directory is modified
Uses inotifywait from inotify-tools ( http://wiki.github.com/rvoicilas/inotify-tools/ ), that is compatible only with linux. Usefull when you work with files that have to be compiled.. latex, haml, c..

How many days until the end of the year

UPS Tracking Script

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

Synchronize both your system clock and hardware clock and calculate/adjust time drift
Do not run this command if you already have ntpd running! This needs to run as root, for example with sudo: $ sudo ntpdate pool.ntp.org && sudo hwclock --systohc && sudo hwclock --adjust This command will fetch accurate time from NTP servers and synchronize your system clock, then it will use the system clock to synchronize your hardware clock, and will calculate the time drift.

Stripping ^M at end of each line for files

Last Minute Cheap Essay
Writing a paper is never an easy chore. When students start college, they are confronted with a variety of new situations, but one of the most difficult is completing projects before the deadline. Many students' physical and mental health can suffer as a result of pressure, stress, and anxiety. International students face significant difficulties because English is a difficult language for them. After lessons and long college hours, many students don’t have the time or energy to write extensive essays. Students can be seen juggling classes, jobs, social lives, and finding time for themselves. I need someone to write an essay for me, you might be thinking. Prepare to be surprised! With our assignment service, we can help you get rid of all of your troubles. We will write an A+ essay for you to ensure that you get good grades on your tasks.

Summarize size of all files of given type in all subdirectories (in bytes)
This deals nicely with filenames containing special characters and can deal with more files than can fit on a commandline. It also avoids spawning du.

Clear your history saved into .bash_history file!
clears the history

Console clock -- within screen
Configures screen to always display the clock in the last line (has to be configured only once). After that you not only have got the possibility to detach sessions and run them in background, but also have got a nice clock permanently on your screen.


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: