2010년 6월 16일 수요일

Unix/Linux command reference (2)

System info

  • date : show the current date and time 
  • cal : show this month's calendar
  • uptime : show current uptime
  • w : display who is online
  • whoami :  who you are logged in as
  • finger user : display information about user
  • uname -a : show kernel information
  • cat /proc/cpuinfo : cpu information
  • cat /proc/meninfo : memory information
  • man command :  show the manual for command
  • df : show disk usage
  • du : show directory space usage
  • free : show memory and swap usage
  • whereis app : show possible locations of app
  • which app :  show which app will be run by default


Compression

  • tar cf file.tar files : create a tar named file.tar containing files
  • tar xf file.tar : extract the files from file.tar
  • tar czf file.tar.gz files : create a tar with Gzip compression
  • tar xzf file.tar.gz : extract a tar using Gzip
  • tar cjf file.tar.bz2 : create a tar with Bzip2 compression
  • tar xjf file.tar.bz2 : extract a tar using Bzip2
  • gzip file : compresses file and renames it to file.gz
  • gzip -d file.gz :  decompresses file.gz back to file
Network

  • ping host :  ping host and output results
  • whois domain : get whois information for domain
  • dig domain : get DNS information for domain
  • dig -x host : reverse lookup host 
  • wget file : download file
  • wget -c file : continue a stopped download
Installation
  • Install from source : ./configure
  • make
  • make install
  • dpkg -i pkg.deb : install a package (Debian)
  • rpm -Uvh pkg.rpm : install a package (RPM)

댓글 없음:

댓글 쓰기