APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

2003/12/15 strings command


© December 2003 Tony Lawrence

Extract printable strings from a file. The usual use is to look inside some data or program file to get possibly useful information out of it. It's also useful if you have a file that MIGHT contain garbage control characters and you just want to be safe.

Without any flags, strings doesn't necessarily search the entire file:

apl$ strings  -15 `which strings` | wc -l
     207
apl$ strings -a -15 `which strings` | wc -l
     208
apl$ strings - -15 `which strings` | wc -l
     242
 

But on a Linux box:

bash-2.05a$ strings  -15 `which strings` | wc -l
     47
bash-2.05a$ strings  -a -15 `which strings` | wc -l
     47
bash-2.05a$ strings  - -15 `which strings` | wc -l
     47
 

And on a BSD box, "-" and "-a" are equivalent:

bash-2.05a$ strings  -15 `which strings` | wc -l
     117
bash-2.05a$ strings  -a -15 `which strings` | wc -l
     172
bash-2.05a$ strings  - -15 `which strings` | wc -l
     172
 

Got something to add? Send me email.





(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

->
-> strings


Inexpensive and informative Apple related e-books:

Photos: A Take Control Crash Course

iOS 10: A Take Control Crash Course

Take Control of iCloud

Take Control of Apple Mail, Third Edition

Take Control of iCloud, Fifth Edition




More Articles by © Tony Lawrence




Printer Friendly Version

Have you tried Searching this site?

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us


Printer Friendly Version





The best of us would rather be popular than right. (Mark Twain)




Linux posts

Troubleshooting posts


This post tagged:

Scripting

Shell

UnixWords



Unix/Linux Consultants

Skills Tests

Unix/Linux Book Reviews

My Unix/Linux Troubleshooting Book

This site runs on Linode





SCO Unix Sales, Support, & Service

Phone:  707-SCO-UNIX (707-726-8649Toll Free: 833-SCO-UNIX (833-726-8649)
www.SCOsales.com