Hide

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.


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.
Hide

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:

Hide

News

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!
Hide

Top Tags

Hide

Functions

Psst. Open beta.

Wow, didn't really expect you to read this far down. The latest iteration of the site is in open beta. It's a gentle open beta-- not in prime-time just yet. It's being hosted over at UpGuard (link) and you are more than welcome to give it a shot. Couple things:

  • » The open beta is running a copy of the database that will not carry over to the final version. Don't post anything you don't mind losing.
  • » If you wish to use your user account, you will probably need to reset your password.
Your feedback is appreciated via the form on the beta page. Thanks! -Jon & CLFU Team

Find corrupted jpeg image files

Terminal - Find corrupted jpeg image files
find . -name "*jpg" -exec jpeginfo -c {} \; | grep -E "WARNING|ERROR"
2009-06-03 22:08:48
User: vincentp
Functions: find grep
13
Find corrupted jpeg image files

Finds all corrupted jpeg files in current directory and its subdirectories. Displays the error or warning found.

The jpeginfo is part of the jpeginfo package in debian.

Should you wish to only get corrupted filenames, use cut to extract them :

find ./ -name *jpg -exec jpeginfo -c {} \; | grep -E "WARNING|ERROR" | cut -d " " -f 1

Alternatives

There are 4 alternatives - vote for the best!

Terminal - Alternatives
find . -iname '*jpg' -print0 | xargs -0 exiftool -warning; find . -iname '*jpg' -print0 | xargs -0 jpeginfo -c
2013-01-28 16:44:19
Functions: find xargs
0

This checks jpeg data and metadata, should be grepped as needed, maybe a -B1 Warning for the first, and a -E "WARNING|ERROR" for the second part....

Know a better way?

If you can do better, submit your command here.

What others think

the *jpg _needs_ to be quoted "*jpg" !

consider using `-iname` instead; especially in the case of removable media.

Comment by asmoore82 396 weeks and 4 days ago

i see several problems with that...

- this only checks jpeg data, but not the metadata. 'exiftool -warning' can be used for the metadata

- it calls jpeginfo for every single file, which consumes a lot of resources if run against plenty pictures.

- case sensitivity/quoting

i tried to post an alternative, but seem to have failed at that :p

basically:

find . -iname '*.jpg' -print0 | xargs -0 jpeginfo -c find . -iname '*.jpg' -print0 | xargs -0 exiftool -warning
Comment by unixmonkey46191 207 weeks ago

Ladies really loves comparing prices and so will not mind throughout spending anywhere of your energy for shopping for a variety of add-ons which could match for the style of dress they'll wear on the particular occasion therefore the particular demand of women of all ages extras go up with time and out of the a variety of equipment popular with females handbags have overpassed the particular revenue for a lot of components which might be popular with as well as consequently is actually getting numerous website visitors to develop the job since Handbags suppliers that you are swapping any item on complete purchase base then the profits superb and you could effortlessly cater enough clients, several handbags importers are looking forward to grow to be Handbags suppliers while through performing a similar they can simply raise the profit that they can use to generate earlier through doing precisely the same task and by offering a similar market while they used to do just before.With this shifting a serious amounts of with all the growing availability of world wide web various internet retailers have emerged in addition to slowly after some time actual physical stores are obtaining substituted with websites while internet vendors are providing various worth adds and helpful within the real shops and so are therefore popular with the clientele since the online stores are open up 20 or so fours a day and seven days and nights weekly and therefore you don't need to modify your period schedule in line with the store timings and will easily visit the store much like the benefit, these web based retailers provides a very good selection and you will get the best number ofHandbags merchants providing the solution in extremely competitive prices to draw in brand new client.If you have been looking onward to be a Handbags wholesalers you need to realise the needs of clientele what is well-liked with current market currently along with to continually preserve excellent partnership with the retailors and need to comprehend their demands and have to ensure that the actual delivery of the products in well-timed manner similar to every single hold off are going to sacrificing your http://www.hermesbeltsbirkinkellybag.co.uk/ customers and so reasonable shipping and delivery is vital for any Handbags merchants. If you want to ahead to be Handbags wholesale suppliers you may available your own retailer on the internet and could serve much more buyers by means of promoting exactly the same product or service and can therefore enhance the earnings that you'll be generating when you just need to put your solutions around the online store and make certain that you simply supply beneficial selection.

Comment by stephanieg915 14 hours ago

Your point of view

You must be signed in to comment.