strings (Linux Command)

On April 21, 2009, in linux, linux commands, by arul
2


strings - Print the strings of printable characters in files.
Summary
For each file given, strings prints the printable character sequences that are at least 4 characters long & are followed by an unprintable character. Strings is mainly useful for determining the contents of non-text files.
Example
$ strings /bin/ls — Prints the strings from initialized & loaded
sections.
$ strings -a file — Scan the whole file for the strings.
$ strings -f /bin/* | grep Free — Print Filename before each string.
$ strings -t o file — Print the offset within the file before each string [o = octal, x = hex, d = decimal].
$ strings -n 10 file — Print sequences of characters that are at least 10 characters long (Default 4).

NOTE: Write one “Hello World” Program in C and try this command on the binary file(a.out) of that program.

Share
Tagged with:
 

whereis (Linux command)

On April 20, 2009, in linux, linux commands, by mahesh
0


whatis — Search the whatis database for complete words.

Summary
Whatis DB contains the name and one line description about
all man pages.  whatis searches for keywords and  displays
the result(s).  Only complete  word matches are displayed.

Examples

$ whatis ls  #Show small info about ls command.

$ whatis perl  #Show small info about Perl.

$ whatis gcc  #Show small info about GCC command.

$ whatis printf  #Show small info about printf.

$ whatis socket  #Show small info about socket.

$ whatis compile  #Just try (Error).

Location of whatis DB: /var/cache/man/whatis

Share
Tagged with:
 

man (Linux command)

On April 20, 2009, in linux, linux commands, by mahesh
0


man – Format and display the ‘MAN’ual pages.

Summary

Most of the commands are comes with a specially formatted manual,
which explains “how to use the command, option list, etc..”.
‘man’ command is used to view those manual page.

Man pages are sorted in categories, as mentioned below:

1. Executable programs / Shell commands
2. System calls
3. Library calls
4. Special files
5. Config file formats and conventions
6. Games
7. Miscellaneous
8. System administration commands
9. Non-standard

Examples

$ man man  #Display the manual page of the man command

$ man ls  #Display the manual page of the ls command

$ man printf  #Display printf command man page.

Share
Tagged with: