Strings Command in Linux

dragonballgtz

Banned
Mar 9, 2001
2,334
0
0
I am just learning Linux at school. For some reason I can't use the strings command on my computer.
The strange thing is some people can use it on their computers and others can't. Does any one know why I
I can't use the srings command?

Thank you

EDIT: This is what it says when I try to use the strings command
bash:strings: command not found
 
 

dragonballgtz

Banned
Mar 9, 2001
2,334
0
0
I'm at home right now and cannot remember exactly what it says. Something along the lines of:

Bad command (bath or batch):confused: strings command.

 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Originally posted by: dragonballgtz
I'm at home right now and cannot remember exactly what it says. Something along the lines of:

Bad command (bath or batch):confused: strings command.

How are we supposed to diagnose a problem if we don't know anything about it?

Make sure strings is in your $PATH.
 

dragonballgtz

Banned
Mar 9, 2001
2,334
0
0
Originally posted by: n0cmonkey
Originally posted by: dragonballgtz
I'm at home right now and cannot remember exactly what it says. Something along the lines of:

Bad command (bath or batch):confused: strings command.

How are we supposed to diagnose a problem if we don't know anything about it?

Make sure strings is in your $PATH.

I posted the topic while I was at school. Sorry.
 

dragonballgtz

Banned
Mar 9, 2001
2,334
0
0
Originally posted by: dragonballgtz
Originally posted by: n0cmonkey
Originally posted by: dragonballgtz
I'm at home right now and cannot remember exactly what it says. Something along the lines of:

Bad command (bath or batch):confused: strings command.

How are we supposed to diagnose a problem if we don't know anything about it?

Make sure strings is in your $PATH.

I posted the topic while I was at school. Sorry.

OK I'm at school now and it says
bash:strings: command not found

 

KB

Diamond Member
Nov 8, 1999
5,406
389
126
run "locate strings" to see if it is installed. If it is, add the path to it in your $PATH.
 

palswim

Golden Member
Nov 23, 2003
1,049
0
71
www.palswim.net
Necro thread, but I'm encountering this problem as well.

Code:
# which strings
which: no strings in (/home/[user]/bin:/usr/local/bin:/usr/bin:/sbin:/usr/sbin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/usr/lib/mit/bin)

I'm running OpenSUSE 11.4 (x86_64). I recently installed via a LiveCD; did I miss a setting somewhere?
 

Fallen Kell

Diamond Member
Oct 9, 1999
6,150
504
126
WHICH will only tell you what YOU have set for your path. If your path isn't set correctly, it won't find anything. As already stated, start with running "locate strings", and if that doesn't work (as could very well be the case, because they probably are not running the "updatedb" command), you should next try "find / -name strings -print"... That command WILL take a while. Now I personally have "strings" located under "/usr/bin/", but I could just as easily had it under "/data/my_data/personal_stuff/bin/strings", or "/home/username/bin/strings", or "/opt/GNU/bin/strings", or basically anywhere the sys admin placed the software or mounted it from a remote system, or you yourself compiled, built, and installed....

If you use Red Hat or similar RPM based system, you can try running "rpm -qa | grep binutils" (at least on Red Hat, strings is part of the binutils RPM), and then you will know if it was installed. If this is a school system, it is also very possible that the system admin didn't install it on all the machines, and you might need to ssh into a different computer to access it....

EDIT:

Just saw you use SuSE which is RPM based, and the strings command is included in the binutils rpm. So you probably need to install the binutils rpm, which should be located on your installation DVD somewhere. Once you find the RPM file, do "rpm -ivh your_binutils_file_rpm_name"
 
Last edited: