Linux/1-Commands: Difference between revisions

From Wiki
No edit summary
No edit summary
Line 28: Line 28:
| vi config.txt
| vi config.txt
|-
|-
|  
| '''Files'''
|  
|  
|  
|  
Line 57: Line 57:
| dd if=/dev/sda2 of=/dev/sdb2  
| dd if=/dev/sda2 of=/dev/sdb2  
|-
|-
|
| '''Search'''
|
|
|
|
Line 77: Line 77:
|
|
|-
|-
|
| '''System info'''
| -
 
|}
|}



Revision as of 20:38, 16 October 2012

Command Arguments Info Example
Basic
dir -Flah list folder content dir -Flah
cat %file show file content cat config.txt
nano (%file) file editor nano
vi(m) %file file editor vi config.txt
Files
mkdir %dir create dir mkdir /var/test
rm %file remove file/dir rm autoexec.bat
cp %from %to copy
mv %from %to move
dd if=%in of=%out low level copy dd if=/dev/sda2 of=/dev/sdb2
Search
locate %file locate file locate fstab
updatedb update locate database
find / -n %filename search for file
System info -


  • system info
    • uname -a
    • free -m
    • fdisk -l
    • df -Th
    • du
    • ifconfig
    • top
    • vnstat
    • who, w
    • pwd


  • runlevel
    • runlevel
    • init 2
    • halt
    • reboot


  • network
    • pppoeconf
    • wget
    • dig
    • whois
    • nslookup
    • finger
    • route -n
    • iwconfig
    • iwlist scan


  • apt
    • apt-get install <package> (-s = simulation)
    • apt-get update
    • apt-get upgrade
    • apt-get dist-upgrade
    • aptitude
    • dpkg -c
    • dpkg --get-selections
    • /etc/apt/sources.list