|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comd
|
Description
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# init 0
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# logout
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# reboot
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# shutdown -h now
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# shutdown -h 16:30 &
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# shutdown -c
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# shutdown -r now
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# telinit 0
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comd
|
Description
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# cd /home
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# cd ..
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# cd ../..
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# cd
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# cd ~user1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# cd -
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# cp file1 file2
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# cp dir/* .
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# cp -a /tmp/dir1 .
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# cp -a dir1 dir2
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# cp file file1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# iconv -l
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# iconv -f fromEncoding -t toEncoding inputFile > outputFile
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# find . -maxdepth 1 -name *.jpg -print -exec convert
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# ln -s file1 lnk1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# ln file1 lnk1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# ls
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# ls -F
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# ls -l
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# ls -a
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# ls *0-9*
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# lstree
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# mkdir dir1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# mkdir dir1 dir2
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# mkdir -p /tmp/dir1/dir2
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# mv dir1 new_dir
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# pwd
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# rm -f file1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# rm -rf dir1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# rm -rf dir1 dir2
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# rmdir dir1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# touch -t 0712250000 file1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# tree
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comd
|
Description
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# find / -name file1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# find / -user user1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# find /home/user1 -name \*.bin
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# find /usr/bin -type f -atime +100
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# find /usr/bin -type f -mtime -10
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# find / -name *.rpm -exec chmod 755 '{}' \;
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# find / -xdev -name \*.rpm
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# locate \*.ps
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# whereis halt
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# which halt
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comd
|
Description
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# fuser -km /mnt/hda2
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# mount /dev/hda2 /mnt/hda2
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# mount /dev/fd0 /mnt/floppy
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# mount /dev/cdrom /mnt/cdrom
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# mount /dev/hdc /mnt/cdrecorder
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# mount /dev/hdb /mnt/cdrecorder
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# mount -o loop file.iso /mnt/cdrom
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# mount -t vfat /dev/hda5 /mnt/hda5
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# mount /dev/sda1 /mnt/usbdisk
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# mount -t smbfs -o username=user,password=pass
//WinClient/share /mnt/share
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# umount /dev/hda2
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# umount -n /mnt/hda2
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comd
|
Description
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# chgrp group1 file1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# chmod ugo+rwx directory1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# chmod go-rwx directory1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# chmod u+s /bin/file1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# chmod u-s /bin/file1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# chmod g+s /home/public
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# chmod g-s /home/public
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# chmod o+t /home/public
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# chmod o-t /home/public
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# chown user1 file1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# chown -R user1 directory1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# chown user1:group1 file1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# find / -perm -u+s
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# ls -lh
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# ls /tmp | pr -T5 -W$COLUMNS
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comd
|
Description
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# chattr +a file1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# chattr +c file1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# chattr +d file1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# chattr +i file1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# chattr +s file1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# chattr +S file1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# chattr +u file1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# lsattr
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comd
|
Description
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# bunzip2 file1.bz2
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# bzip2 file1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# gunzip file1.gz
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# gzip file1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# gzip -9 file1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# rar a file1.rar test_file
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# rar a file1.rar file1 file2 dir1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# rar x file1.rar
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# tar -cvf archive.tar file1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# tar -cvf archive.tar file1 file2 dir1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# tar -tf archive.tar
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# tar -xvf archive.tar
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# tar -xvf archive.tar -C /tmp
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# tar -cvfj archive.tar.bz2 dir1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# tar -xvfj archive.tar.bz2
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# tar -cvfz archive.tar.gz dir1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# tar -xvfz archive.tar.gz
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# unrar x file1.rar
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# unzip file1.zip
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# zip file1.zip file1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# zip -r file1.zip file1 file2 dir1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comd
|
Description
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# yum -y install package
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# yum localinstall package.rpm
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# yum -y update
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# yum update package
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# yum remove package
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# yum list
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# yum search package
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# yum clean package
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# yum clean headers
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# yum clean all
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comd
|
Description
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# dpkg -i package.deb
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# dpkg -r package
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# dpkg -l
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# dpkg -l | grep httpd
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# dpkg -s package
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# dpkg -L package
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# dpkg --contents package.deb
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# dpkg -S /bin/ping
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comd
|
Description
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# apt-cache search package
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# apt-cdrom install package
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# apt-get install package
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# apt-get update
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# apt-get upgrade
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# apt-get remove package
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# apt-get check
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# apt-get clean
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comd
|
Description
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# cat file1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# head -2 file1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# less file1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# more file1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# tac file1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# tail -2 file1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# tail -f /var/log/messages
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comd
|
Description
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# cat example.txt | awk 'NR%2==1'
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# echo a b c | awk '{print $1}'
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# echo a b c | awk '{print $1,$3}'
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# cat -n file1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# comm -1 file1 file2
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# comm -2 file1 file2
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# comm -3 file1 file2
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# diff file1 file2
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# grep Aug /var/log/messages
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# grep ^Aug /var/log/messages
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# grep 0-9 /var/log/messages
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# grep Aug -R /var/log/*
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# paste file1 file2
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# paste -d '+' file1 file2
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# sdiff file1 file2
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# sed 's/string1/string2/g' example.txt
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# sed '/^$/d' example.txt
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# sed '/ *#/d; /^$/d' example.txt
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# sed -e '1d' exampe.txt
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# sed -n '/string1/p'
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# sed -e 's/ *$//' example.txt
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# sed -e 's/string1//g' example.txt
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# sed -n '1,5p' example.txt
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# sed -n '5p;5q' example.txt
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# sed -e 's/00*/0/g' example.txt
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# sort file1 file2
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# sort file1 file2 | uniq
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# sort file1 file2 | uniq -u
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# sort file1 file2 | uniq -d
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# echo 'word' | tr ':lower:' ':upper:'
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comd
|
Description
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# dos2unix filedos.txt fileunix.txt
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# recode ..HTML < page.txt > page.html
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# recode -l | more
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# unix2dos fileunix.txt filedos.txt
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comd
|
Description
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# badblocks -v /dev/hda1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# dosfsck /dev/hda1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# e2fsck /dev/hda1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# e2fsck -j /dev/hda1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# fsck /dev/hda1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# fsck.ext2 /dev/hda1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# fsck.ext3 /dev/hda1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# fsck.vfat /dev/hda1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# fsck.msdos /dev/hda1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comd
|
Description
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# fdformat -n /dev/fd0
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# mke2fs /dev/hda1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# mke2fs -j /dev/hda1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# mkfs /dev/hda1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# mkfs -t vfat 32 -F /dev/hda1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# mkswap /dev/hda3
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comd
|
Description
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# mkswap /dev/hda3
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# swapon /dev/hda3
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# swapon /dev/hda2 /dev/hdb3
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comd
|
Description
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# find /var/log -name '*.log' | tar cv --files-from=- | bzip2
> log.tar.bz2
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# find /home/user1 -name '*.txt' | xargs cp -av
--target-directory=/home/backup/ --parents
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# dd bs=1M if=/dev/hda | gzip | ssh user@ip_addr 'dd of=hda.gz'
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# dd if=/dev/sda of=/tmp/file1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# dd if=/dev/hda of=/dev/fd0 bs=512 count=1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# dd if=/dev/fd0 of=/dev/hda bs=512 count=1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# dump -0aj -f /tmp/home0.bak /home
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# dump -1aj -f /tmp/home0.bak /home
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# restore -if /tmp/home0.bak
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# rsync -rogpav --delete /home /tmp
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# rsync -rogpav -e ssh --delete /home ip_address:/tmp
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# rsync -az -e ssh --delete ip_addr:/home/public /home/local
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# rsync -az -e ssh --delete /home/local ip_addr:/home/public
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# tar -Puf backup.tar /home/user
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# ( cd /tmp/local/ && tar c . ) | ssh -C user@ip_addr
'cd /home/share/ && tar x -p'
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# ( tar c /home ) | ssh -C user@ip_addr 'cd /home/backup-home
&& tar x -p'
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# tar cf - . | (cd /tmp/backup ; tar xf - )
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comd
|
Description
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# cd-paranoia -B
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# cd-paranoia --
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# cdrecord -v gracetime=2 dev=/dev/cdrom -eject blank=fast -force
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# cdrecord -v dev=/dev/cdrom cd.iso
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# gzip -dc cd_iso.gz | cdrecord dev=/dev/cdrom -
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# cdrecord --scanbus
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# dd if=/dev/hdc | md5sum
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# mkisofs /dev/cdrom > cd.iso
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# mkisofs /dev/cdrom | gzip > cd_iso.gz
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# mkisofs -J -allow-leading-dots -R -V
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# mount -o loop cd.iso /mnt/iso
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comd
|
Description
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# dhclient eth0
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# ethtool eth0
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# host www.example.com
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# hostname
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# ifconfig eth0
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# ifconfig eth0 192.168.1.1 netmask 255.255.255.0
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# ifconfig eth0 promisc
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# ifdown eth0
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# ifup eth0
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# ip link show
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# iwconfig eth1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# iwlist scan
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# mii-tool eth0
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# netstat -tup
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# netstat -tupl
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# netstat -rn
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# nslookup www.example.com
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# route -n
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# route add -net 0/0 gw IP_Gateway
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# route add -net 192.168.0.0 netmask 255.255.0.0 gw 192.168.1.1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# route del 0/0 gw IP_gateway
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# echo "1" > /proc/sys/net/ipv4/ip_forward
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# tcpdump tcp port 80
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# whois www.example.com
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comd
|
Description
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# mount -t smbfs -o username=user,password=pass
//WinClient/share /mnt/share
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# nbtscan ip_addr
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# nmblookup -A ip_addr
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# smbclient -L ip_addr/hostname
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# smbget -Rr smb://ip_addr/share
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comd
|
Description
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# iptables -t filter -L
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# iptables -t nat -L
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# iptables -t filter -F
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# iptables -t nat -F
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# iptables -t filter -X
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# iptables -t filter -A INPUT -p tcp --dport telnet -j ACCEPT
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# iptables -t filter -A OUTPUT -p tcp --dport http -j DROP
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# iptables -t filter -A FORWARD -p tcp --dport pop3 -j ACCEPT
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# iptables -t filter -A INPUT -j LOG --log-prefix
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# iptables -t nat -A PREROUTING -d 192.168.0.1 -p tcp -m tcp
--dport 22 -j DNAT --to-destination 10.0.0.2:22
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comd
|
Description
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# free -m
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# kill -9 process_id
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# kill -1 process_id
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# last reboot
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# lsmod
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# lsof -p process_id
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# lsof /home/user1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# ps -eafw
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# ps -e -o pid,args --forest
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# pstree
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# smartctl -A /dev/hda
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comd
|
Description
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# alias hh='history'
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# apropos ...keyword
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# chsh
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# chsh --list-shells
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# gpg -c file1
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# gpg file1.gpg
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# ldd /usr/bin/ssh
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# ping
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# mkbootdisk --device /dev/fd0 `uname -r`
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# wget -r www.example.com
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# wget -c www.example.com/file.iso
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# echo 'wget -c www.example.com/files.iso' | at 09:00
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# whatis ...keyword
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# who -a
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comd
|
Description
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# pac -S name
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# pac -R name
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Those who want to start with jsp and MySQL, this is an excellent example for themselves. Here you can learn how to insert data to MySQL using JSP. Also you can learn about session handling in jsp. 1 2 3 4 5 6 7 8 9 10 CREATE TABLE `members` ( `id` int (10) unsigned NOT NULL auto_increment, `first_name` varchar (45) NOT NULL , `last_name` varchar (45) NOT NULL , `email` varchar (45) NOT NULL , `uname` varchar (45) NOT NULL , `pass` varchar (45) NOT NULL , `regdate` date NOT NULL , PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; index.jsp 1 2 3 4 5 6 ...
Comments
Post a Comment