What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again.

Delete that bloated snippets file you've been using and share your personal repository with the world. 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.

If you have a new feature suggestion or find a bug, please get in touch via http://commandlinefu.uservoice.com/

Get involved!

You can sign-in using OpenID credentials, or register a traditional username and password.

First-time OpenID users will be automatically assigned a username which can be changed after signing in.

Universal configuration monitoring and system of record for IT.

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:



May 19, 2015 - A Look At The New Commandlinefu
I've put together a short writeup on what kind of newness you can expect from the next iteration of clfu. Check it out here.
March 2, 2015 - New Management
I'm Jon, I'll be maintaining and improving clfu. Thanks to David for building such a great resource!

Top Tags



List latest 5 modified files recursively

Terminal - List latest 5 modified files recursively
find . -type f -printf '%T@ %TY-%Tm-%Td %TH:%TM:%.2TS %p\n' | sort -nr | head -n 5 | cut -f2- -d" "
2016-03-23 11:56:39
User: paulera
Functions: cut find head sort
List latest 5 modified files recursively

The output format is given by the -printf parameter:

%T@ = modify time in seconds since Jan. 1, 1970, 00:00 GMT, with fractional part. Mandatory, hidden in the end.

%TY-%Tm-%Td %TH:%TM:%.2TS = modify time as YYYY-MM-DD HH:MM:SS. Optional.

%p = file path

Refer to http://linux.die.net/man/1/find for more about -printf formatting.


sort -nr = sort numerically and reverse (higher values - most recent timestamp - first)

head -n 5 = get only 5 first lines (change 5 to whatever you want)

cut -f2- -d" " = trim first field (timestamp, used only for sorting)


Very useful for building scripts for detecting malicious files upload and malware injections.


There is 1 alternative - vote for the best!

Terminal - Alternatives

Know a better way?

If you can do better, submit your command here.

What others think

http://cheapraybans.outletonlinestores.net/ cheap ray bans

http://coach.outletsonlinesale.com/ coach factory online

http://coach.outletstore.us.com/ coach outlet

http://coachoutlet.outletstore.us.com/ Coach Outlet Store Online

http://raybans.jonmcmeen.com cheap ray bans

http://www.2015ray-bansales.com ray ban outlet

http://www.2015raybansunglasses.net/ ray ban sunglasses outlet

http://www.cheapmichaelkorsbags.org michael kors outlet online

http://www.cheapraybans.name cheap ray bans

http://www.cheapraybans.xyz/ discount ray ban sunglasses

http://www.cheapraybansales.net/ ray ban outlet

http://www.coach-factory-outlet.xyz/ coach factory online

http://www.coachfactory-outletonlines.us.com/ coach outlet store online

http://www.coachonlinestores.us.com/ coach factory store

http://www.coach-outlet-onlines.cc/ coach outlet online

http://www.coachusaoutlet.net/ coach outlet store

http://www.discountmichaelkorsbags.org michael kors outlet

http://www.michael-korsoutlet.xyz/ michael kors factory outlet

http://www.michaelkorsoutlethandbags.us michael kors handbags outlet

http://www.michaelkorsoutletonline.biz michael kors purses outlet

http://www.michaelkorsoutlets.xyz/ michael kors outlet online

http://www.michaelkorsoutletstore.us michael kors factory outlet

http://www.offical-michaelkorssale.com/ michael kors purses on sale

http://www.official-coachsales.cc/ coach factory outlet online

http://www.official-mkoutlet.cc/ michael kors outlet online

http://www.outlets-coach.org coach outlet store

http://www.outlets-coachhandbags.org/ coach factory outlet online

http://www.outlets-michael-kors.net/ michael kors outlet online

http://www.rayban-outlet.name/ ray ban sunglasses discount

http://www.raybanoutletss.com/ ray bans aviators

http://www.rayban-sunglasses.xyz/ ray ban sunglasses sale

http://www.raybanussales.com/ ray ban sunglasses sale

http://www.rboutlet2015.net/ ray ban outlet stores

http://www.rbsunglassesoutlets.com/ cheap ray ban sunglasses

http://www.sunglasses-hut.cc ray ban sunglasses discount

http://www.sunglassesoutlet-rb.com/ cheap ray bans

http://rayban.sunglassesoutlets.us.com/ ray ban sunglasses

http://m.sunglassesoutlets.us.com/ ray ban sunglasses outlet

Comment by fuxiaobu 2 weeks ago

Your point of view

You must be signed in to comment.