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.

UpGuard checks and validates configurations for every major OS, network device, and cloud provider.
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

Show only printable characters and newlines from a file or input

Terminal - Show only printable characters and newlines from a file or input
strings -1 <file>
2012-11-23 11:33:25
User: Testuser_01
Functions: strings
-1
Show only printable characters and newlines from a file or input

Use this like the cat command with the additional feature to strip out unprintable characters from the input, newlines will stay.

Alternatives

There are 2 alternatives - vote for the best!

Terminal - Alternatives
tr -dc '[:print:]' < <file>
2012-11-22 06:29:26
User: seb1245
Functions: tr
Tags: printing tr
3

tr has some predefined sets of characters that are more convenient to use than characters codes

Know a better way?

If you can do better, submit your command here.

What others think

"strings" doesn't remove end of lines and discards lines with less than 4 characters by default:

echo 123 | strings

prints nothings.

Comment by seb1245 252 weeks and 1 day ago

"strings" doesn't remove end of lines and discards lines with less than 4 characters by default:

echo 123 | strings

prints nothings.

Comment by seb1245 252 weeks and 1 day ago

"strings" doesn't remove end of lines and discards lines with less than 4 characters by default:

echo 123 | strings

prints nothings.

Comment by seb1245 252 weeks and 1 day ago

The minimum can be altered with -1, I'll add this.

You are right as the newlines stay. Then the description here is wrong and it's no real alternative to your tr command.

I changed this, thanks.

As the man page says, "strings is mainly useful for determining the contents of non-text files".

Comment by Testuser_01 252 weeks and 1 day ago

http://www.michaelkors-handbags.in.net

http://www.canadagoosejacketssale.us.com

http://www.cheapraybans-sunglasses.us.com

http://www.michaelkorsoutletofficials.us.com

http://www.christian-louboutinoutlet.us.org

http://www.christianlouboutin.com.co

http://www.ralphlaurenpoloshirts.me.uk

http://www.lacosteoutlet.us.org

http://www.adidasshoes.us.org

http://www.coachfactoryoutletonlinestores.us.com

http://www.ralph-laurenpolooutlet.us.com

http://www.mont-blancpens.us.com

http://www.michaelkorsoutletclearancee.us.com

http://www.fitflopsaleclearance.us.com

http://www.polooutlet.name

http://www.coachfactoryoutletofficials.us.com

http://www.raybansunglassesformen.us.com

http://www.mbtshoesoutlets.us.com

http://www.oakley-sunglassesoutletonline.us.com

http://www.nikeshoes.com.co

http://www.cheapuggboots.name

http://www.cheapuggboots.org

http://www.raybansun-glasses.com.co

http://www.fredperry.org.uk

http://www.ralphlaurenpolo-uk.org.uk

http://www.valentinooutlet.in.net

http://www.polooutletralphlauren.us.com

http://www.oakleysunglasseswholesaler.us.com

http://www.montblancpensoutlet.com

http://www.ralphlauren-polo.me.uk

http://www.yeezyboost350-v2.us.com

http://www.mcmoutletonline.us

http://raybansunglasses.co-sunglasses.com

http://nikeshoes.nike-com.com

http://www.oakley-sunglassesclearance.us.com

http://www.truereligionjeanss.us.com

http://www.pandoraoutlets.us.com

http://www.montblancpens-outlet.us.com

http://www.lunetterayban.fr

http://www.airjordan4.us

http://www.canadagooseoutlet-store.com.co

http://www.adidasnmd-r1.us.com

http://www.truereligionjeans-sale.us.com

http://www.mlbjerseys.net

http://www.adidasyeezyshoes.name

http://www.poloralphlaurenfactorystore.us.com

http://www.cheapjordans.name

http://www.edhardyclothing.us.com

http://www.michaelkorsoutletclearancehandbags.us.com

http://www.polo-ralphlaurenuk.me.uk

http://www.fitflops-saleclearance.us

http://www.cheapmlb-jerseys.us

http://www.nikeshoesoutlet.us.com

http://polooutlet.amegov.com

http://www.katespadeshandbags.us

http://www.ralphlauren-outletuk.org.uk

http://www.canadagoose.name

http://www.ralph-laurenoutletuk.me.uk

http://www.ralphlaurenoutlets.org.uk

http://www.michaelkorsoutlet-online.in.net

http://www.fredperrypoloshirts.co.uk

http://www.kate-spadeoutlet.us.org

http://www.nike-shoes.us.com

http://www.truereligion-outletstore.us.com

http://www.polo-ralphlauren-pascher.fr

http://www.poloralphlauren-uk.me.uk

http://www.mbtshoescheap.us.com

http://www.pradaoutletstore.us

http://www.pradaoutlet-store.us.com

http://poloralphlauren.amegov.com

http://www.true-religionoutletstore.us.com

http://www.lebron-jamesshoes.us.com

http://www.cheapuggs.name

http://www.michaelkorsoutlet-clearance.org

http://www.oakleysunglasseswholesales.us.com

http://www.michaelkorsoutlet-clearances.us.com

http://adidasyeezyshoes.adidassale.net

http://www.pandorajewelry-outlet.us.com

http://www.katespadeoutlet-store.us.com

http://www.longchampoutlet.us.org

http://www.nikeoutlet.com.co

http://www.oakleysunglasseswholesalee.us.com

http://www.oakleysunglassescheaps.us.com

http://www.fredperryoutlet.us.com

http://www.longchampoutletofficial.us.com

http://www.coachfactory-outlet.eu.com

http://www.adidasoutlet.com.co

http://www.asicsrunningshoes.us.com

http://www.coach-outletonlineclearance.us.com

http://www.christianlouboutin-uk.org.uk

http://www.oakleysunglassesformen.us.com

http://www.nhljerseyss.us.com

http://cheapraybansunglasses.co-sunglasses.com

http://www.coachfactoryoutletmiami.us.com

http://www.coachoutletcoachoutletstore.us.com

http://www.adidasoutlet.us.org

http://www.cheapjordansfor-sale.us.com

http://www.michaelkorsoutletofficial.com

http://www.hermesbeltsoutlet.us.com

http://www.pandoraoutletstore.us.com

http://www.michaelkorsoutlet-clearance.us

http://www.ralphlauren-shirts.org.uk

http://www.ralphlaurenoutletonlinestore.us.com

http://www.ralphlaurenofficial.us.com

http://www.michael-korshandbags.in.net

http://www.michaelkorsoutletonlinestore.us.org

http://www.oakleysunglassesfactory.us.com

http://www.polooutlet.us.org

http://www.raybanssun-glasses.com.co

http://www.coachoutletonlinecoachfactoryoutlets.us.com

http://www.michaelkorssoutletclearance.us.com

http://www.poloralphlauren-uk.org.uk

http://nikeshoes.up-nike.com

http://www.poloralph-laurenuk.co.uk

http://www.michael-korsoutletstore.in.net

http://www.coachfactoryoutlet-coachoutlet.us.com

http://www.canadagoosejacketss.com.co

http://www.christian-louboutinshoes.us

http://www.coach-outletonlinecoachfactoryoutlet.us.com

http://www.cheapnfljerseys.eu.com

http://www.mlbjerseys-wholesale.us.com

http://www.adidasyeezy-shoes.us.com

http://www.nike-shoes.us.org

http://www.valentino-outlet.us.com

http://www.ralph-laurenpolo.us.org

http://www.raybansunglassesonsale90off.us.com

http://www.fitflopssaleclearance.name

http://www.coachoutletcoachfactoryoutlets.us.com

http://www.airjordan.us.org

http://www.canadagoose-outlets.com.co

http://raybansunglassesoutlet.co-sunglasses.com

http://www.uggoutlet.name

http://www.oakleysunglassesss.us.com

http://www.canadagooses.com.co

http://www.ralphlaurenshirts.me.uk

http://www.michaelkorsoutlet-clearance.com

http://www.cheapjordans-forsale.us.com

http://www.oakleysunglasseswholesaleonline.us.com

http://www.coachoutletonlinecoachfactoryoutlet.com.co

http://www.kate-spadeoutletstore.us.com

http://www.nbajerseyss.us.com

http://yeezyboost.adidassale.net

http://www.nikeoutletstorelocations.com

http://www.montblancpenss.com.co

http://www.pandorajewelrycharms.us.com

http://www.mulberryhandbagsuk.co.uk

http://www.hermesbirkins.us.com

http://www.coachoutlet-clearance.us.org

chenlili20170503

Comment by chenyingying 20 weeks and 4 days ago

shoe is http://www.huaracherunpas-cher.fr/nike-huarache-ultramarine_125.html a brand that http://www.huaracherunpas-cher.fr/nike-air-huarache-chaussures_80.html anybody is familiar with. http://www.huaracherunpas-cher.fr/nike-air-huarache-international_104.html It is often synonymous with sports activities http://www.huaracherunpas-cher.fr/nike-air-flight-huarache_102.html and style http://www.huaracherunpas-cher.fr/nike-huarache-toute-noir_154.html since the actual running shoe brand name had http://www.huaracherunpas-cher.fr/huarache-nike-pas-cher_79.html been founded with '62. http://www.huaracherunpas-cher.fr/nike-air-huarache-og_162.html In the http://www.huaracherunpas-cher.fr/huarache-acheter_83.html practically five decades around, this http://www.huaracherunpas-cher.fr/huarache-noir_86.html footwear have been properties http://www.huaracherunpas-cher.fr/chaussures-huarache_56.html of many people, for the reason that footwear http://www.huaracherunpas-cher.fr/nike-huarache-noir-et-rose_58.html makes shoes or boots http://www.huaracherunpas-cher.fr/air-huarache-run_157.html that fit everybody. http://www.huaracherunpas-cher.fr/nike-air-force-1-huarache_113.html The corporation has had http://www.huaracherunpas-cher.fr/nike-air-huarache-1991_65.html out various outlines of http://www.huaracherunpas-cher.fr/huarache-beige_106.html shoes coming from going for http://www.huaracherunpas-cher.fr/huarache-montante_179.html walks in order to http://www.huaracherunpas-cher.fr/nike-huarache-safari_52.html walking, with regard to cardiovascular individuals for http://www.huaracherunpas-cher.fr/huarache-noir-et-rose_109.html you to children http://www.huaracherunpas-cher.fr/air-huarache-solde_40.html , the idea meets many needs. On http://www.huaracherunpas-cher.fr/nike-air-huarache-retro_70.html the other http://www.huaracherunpas-cher.fr/air-huarache-femme_90.html hand, essentially the most chosen http://www.huaracherunpas-cher.fr/huarache-2017_99.html lines of shoes has become shoe Jordans http://www.huaracherunpas-cher.fr/huarache-noir-femme_60.html , backed with the famous http://www.huaracherunpas-cher.fr/nike-air-huarache-blanc_41.html Jordans; these sneakers http://www.huaracherunpas-cher.fr/nike-air-flight-huarache-og_48.html are definitely the perfect example involving http://www.huaracherunpas-cher.fr/ ease and comfort and http://www.huaracherunpas-cher.fr/nike-huarache-beige_91.html unequaled type.How http://www.huaracherunpas-cher.fr/nike-huarache-usa_114.html running shoe air Jordan took place?shoe air http://www.huaracherunpas-cher.fr/nike-air-huarache-light_168.html Jordan shoes http://www.huaracherunpas-cher.fr/nike-huarache-light-ultramarine_171.html were initially presented in 1984. http://www.huaracherunpas-cher.fr/air-huarache-noire_117.html Subsequently, the corporation offers launched http://www.huaracherunpas-cher.fr/nikeair-huarache_88.html new each year. http://www.huaracherunpas-cher.fr/nike-huarache-blanc_85.html Every design continues to be different and http://www.huaracherunpas-cher.fr/nike-huarache-boutique_147.html distinct. The very first http://www.huaracherunpas-cher.fr/nike-huarache-chaussures_129.html boot in this particular http://www.huaracherunpas-cher.fr/huarache-chaussure_122.html variety had been http://www.huaracherunpas-cher.fr/air-huarache-noir_116.html named running shoe Nike air jordans http://www.huaracherunpas-cher.fr/nike-air-force-huarache_124.html I actually and all http://www.huaracherunpas-cher.fr/nike-air-huarache-taille_172.html sorts of subsequent types are http://www.huaracherunpas-cher.fr/air-nike-huarache_107.html generally known as within http://www.huaracherunpas-cher.fr/air-huarache-homme_67.html the rising numeric http://www.huaracherunpas-cher.fr/huarache-usa_100.html get. shoe air Jordan http://www.huaracherunpas-cher.fr/nike-huarache-run_72.html XX3 or maybe number Twenty three is very http://www.huaracherunpas-cher.fr/free-huarache_103.html exclusive mainly http://www.huaracherunpas-cher.fr/nike-id-huarache_158.html because 12 was also http://www.huaracherunpas-cher.fr/nike-huarache-paris_69.html Erika Jordans shirt number. It was launched http://www.huaracherunpas-cher.fr/huarache-bordeaux_53.html within 08. The first http://www.huaracherunpas-cher.fr/nike-huarache-femmes_182.html footwear that had been produced within http://www.huaracherunpas-cher.fr/air-max-huarache_39.html this http://www.huaracherunpas-cher.fr/nike-huarache-2013_159.html range became a red and http://www.huaracherunpas-cher.fr/nike-huarache-fille_148.html black design and style http://www.huaracherunpas-cher.fr/nike-huarache-rouge_81.html that right away launched a influx within the http://www.huaracherunpas-cher.fr/nike-air-zoom-huarache_89.html boots business. Individuals the http://www.huaracherunpas-cher.fr/nike-huarache-violet_54.html United States http://www.huaracherunpas-cher.fr/air-huarache-blanc_123.html and also the rest http://www.huaracherunpas-cher.fr/huarache-leopard_77.html of the world thronged to http://www.huaracherunpas-cher.fr/nike-huarache-leopard_57.html acquire a two of http://www.huaracherunpas-cher.fr/huarache-light-og_105.html footwear jordans on their own.A http://www.huaracherunpas-cher.fr/nike-air-huarache-light-ultramarine-og_75.html brand-new design was introduced http://www.huaracherunpas-cher.fr/huarache-air-max_163.html in '09 simply Last year http://www.huaracherunpas-cher.fr/huarache-instagram_169.html twos of these shoes and boots http://www.huaracherunpas-cher.fr/nike-huarache_93.html ended up http://www.huaracherunpas-cher.fr/nike-huarache-solde_94.html produced in the marketplace, out of which Us http://www.huaracherunpas-cher.fr/huarache-noir-et-blanc_96.html gotten 1005 and http://www.huaracherunpas-cher.fr/air-huarache-light_139.html also the rest had http://www.huaracherunpas-cher.fr/nike-huarache-marron_165.html been allocated around the earth. http://www.huaracherunpas-cher.fr/nike-huarache-free-light_134.html Your shoe is studded having http://www.huaracherunpas-cher.fr/huarache-nike-blanche_127.html a smaller blue-green diamond. http://www.huaracherunpas-cher.fr/nike-huarache-femme-pas-cher_140.html To really make the http://www.huaracherunpas-cher.fr/chaussure-air-huarache_180.html shoe additional unique, http://www.huaracherunpas-cher.fr/huarache-chaussures_95.html that it was known as Nike jordan http://www.huaracherunpas-cher.fr/nike-huarache-3_108.html Last year. The previous http://www.huaracherunpas-cher.fr/nike-air-huarache-noir_97.html system involving nomenclature seemed to be http://www.huaracherunpas-cher.fr/nike-huarache-noir-et-bleu_130.html forgotten immediately http://www.huaracherunpas-cher.fr/nike-huarache-gris_59.html after XX3 for you http://www.huaracherunpas-cher.fr/huarache-og_183.html to protect their styles. The newest http://www.huaracherunpas-cher.fr/nike-air-huarache-light-pas-cher_44.html models are known http://www.huaracherunpas-cher.fr/air-huarache-paris_138.html as once the 12 months of http://www.huaracherunpas-cher.fr/nike-huarache-1991_55.html these relieve.What is definitely http://www.huaracherunpas-cher.fr/nike-air-huarache-solde_181.html specific about these http://www.huaracherunpas-cher.fr/nike-huarache-free-run-pas-cher_156.html footwear?Men, specially sportsmen in http://www.huaracherunpas-cher.fr/air-huarache-nike_87.html addition to sporting activities fans http://www.huaracherunpas-cher.fr/nike-air-huarache-beige_112.html , usually have had a fetish regarding shoe http://www.huaracherunpas-cher.fr/nike-air-huarache-rouge_47.html jordans sneakers http://www.huaracherunpas-cher.fr/huarache-light_50.html because they're stylish, comfy and http://www.huaracherunpas-cher.fr/huarache-5_74.html perfect regarding sports. Whilst they were http://www.huaracherunpas-cher.fr/nike-air-huarache-run-chaussures_174.html typically introduced as http://www.huaracherunpas-cher.fr/nike-huarache-prix_66.html males running shoe running footwear http://www.huaracherunpas-cher.fr/chaussure-nike-air-huarache_76.html , vehicle readily available for females and http://www.huaracherunpas-cher.fr/air-flight-huarache_68.html little ones. Why http://www.huaracherunpas-cher.fr/huarache-bleu_111.html is this footwear http://www.huaracherunpas-cher.fr/nike-huarache-run-pas-cher_61.html stick out may be the help http://www.huaracherunpas-cher.fr/nike-air-huarache-90_110.html as well as extra http://www.huaracherunpas-cher.fr/basket-nike-huarache_45.html padding that they provide for http://www.huaracherunpas-cher.fr/huarache-nike-noir_149.html the people ft. You can wear http://www.huaracherunpas-cher.fr/huarache-free-run_145.html these http://www.huaracherunpas-cher.fr/chaussure-huarache-nike_173.html individuals for just about any time http://www.huaracherunpas-cher.fr/nike-air-huarache-original_144.html period, participate in sports http://www.huaracherunpas-cher.fr/nike-air-huarache-turquoise_160.html activities all day and still feel simply http://www.huaracherunpas-cher.fr/nike-huarache-taille_49.html no stress around the http://www.huaracherunpas-cher.fr/nike-huarache-homme_141.html foot. In http://www.huaracherunpas-cher.fr/nike-air-max-huarache-hybrid_121.html keeping with their particular identify, they feel while http://www.huaracherunpas-cher.fr/nike-air-huarache-mid_78.html light since oxygen. http://www.huaracherunpas-cher.fr/nike-air-huarache-run_43.html These are http://www.huaracherunpas-cher.fr/nike-air-huarache-2_92.html very easy to use as well as http://www.huaracherunpas-cher.fr/nike-air-huarache-prix_120.html long lasting at the same http://www.huaracherunpas-cher.fr/nike-air-huarache-pas-chere_161.html time. On http://www.huaracherunpas-cher.fr/nike-air-huarache-blanche_153.html account of their particular variety benefits, the http://www.huaracherunpas-cher.fr/huarache-enfant_62.html National basketball http://www.huaracherunpas-cher.fr/nike-huarache-premium_126.html association is a robust patron footwear air http://www.huaracherunpas-cher.fr/air-huarache-og_71.html Jordan. shoe http://www.huaracherunpas-cher.fr/huarrache-blanche_135.html has been presented footwear pertaining to http://www.huaracherunpas-cher.fr/acheter-huarache_84.html Nba gamers due to the fact http://www.huaracherunpas-cher.fr/nike-huarache-light-og_115.html The http://www.huaracherunpas-cher.fr/nike-huarache-2_166.html early 70s.Buy on-line in excellent http://www.huaracherunpas-cher.fr/achat-nike-huarache_137.html pricesshoe nike air jordans is a http://www.huaracherunpas-cher.fr/nike-air-huarache-bleu_167.html superb footwear. It http://www.huaracherunpas-cher.fr/nike-huarache-jd_46.html is also high-priced since all models http://www.huaracherunpas-cher.fr/huarache-4_118.html come in the extra http://www.huaracherunpas-cher.fr/nike-air-huarache-run-pas-cher_98.html involving $100. Even so, since you http://www.huaracherunpas-cher.fr/nike-huarache-pour-femme_155.html have a selection http://www.huaracherunpas-cher.fr/huarache-nike-chaussures_131.html of alternative on the http://www.huaracherunpas-cher.fr/nouvelle-nike-huarache_82.html internet, you can buy your current http://www.huaracherunpas-cher.fr/nike-huarache-agassi_133.html shoes or http://www.huaracherunpas-cher.fr/air-huarache-grise_142.html boots online footwear stores on discount prices. running http://www.huaracherunpas-cher.fr/nike-air-huarache-og-retro_101.html shoe nike http://www.huaracherunpas-cher.fr/basket-huarache_63.html air jordans can be http://www.huaracherunpas-cher.fr/huarache-run_132.html obtained at just about $100 http://www.huaracherunpas-cher.fr/nike-huarache-id_164.html off during these footwear. This http://www.huaracherunpas-cher.fr/nike-air-huarache-light-ultramarine_64.html cherry on the http://www.huaracherunpas-cher.fr/nike-huarache-magenta_51.html dessert is the fact that http://www.huaracherunpas-cher.fr/chaussures-air-huarache_128.html quite a few merchants provide free delivery. http://www.huaracherunpas-cher.fr/huarache-femmes_170.html So, it truly is http://www.huaracherunpas-cher.fr/huarache-vintage_42.html special discounts all the way http://www.huaracherunpas-cher.fr/nike-air-huarache-homme_150.html up to suit your needs.shoe http://www.huaracherunpas-cher.fr/huarache-og-2017_143.html nike air http://www.huaracherunpas-cher.fr/nike-air-huarache-safari_73.html jordan shoes is obtainable on excellent http://www.huaracherunpas-cher.fr/chaussures-huarache-nike_152.html reductions within the leading on the http://www.huaracherunpas-cher.fr/nike-huarache-free-run-2012_146.html web sneaker http://www.huaracherunpas-cher.fr/boutique-nike-huarache_151.html store at paulswarehouse.internet. Brand new arrivals tend to be immediately additional as well as searching here you can get wonderful Lower price footwear footwear with this keep.

Comment by scott154 4 weeks and 2 days ago

Your point of view

You must be signed in to comment.