next up previous
Next: Job control and information Up: Linux/UNIX Previous: Mounting remote UNIX/Linux directories

Getting information

pwd tells what directory you're in
cmd version what version of cmd is being used?
apropos foo tells all commands that deal with foo
ls -al list all files, including hidden files, and display file information
which foo tells path to binary foo (if foo is in path)
whereis foo finds files or directories names 'foo'
locate foo finds directories or files whose names contain 'foo'
find . -type f -print| xargs grep stuff /dir applies grep to a whole tree (/dir in this case)
find /dir -name filename finds filename in /dir
more /proc/cpuinfo in Linux, returns processor type, processor speed, cache size, etc.
more /proc/meminfo in Linux, returns information on memory
uname returns operating system
more /etc/issue in Linux, gives operating system information
hostname returns name of machine
host -n machine gives IP address of machine
rusers -l tells who's on the network
nslookup hsph.harvard.edu returns IP number
nslookup 134.174.190.44 returns hostname
rwho similar to rusers
df -l /dir amount of free disk space in /dir
du -l /dir amount of used space in /dir
du -h /dir amount of used space in human-readable form


next up previous
Next: Job control and information Up: Linux/UNIX Previous: Mounting remote UNIX/Linux directories
Chris Paciorek 2012-01-21