Red Hat Linux9 Learning Notes
date 2004-01
====================================================
COMMAND REF
File And Directory
pwd
cd change directory
ls -a
-s
-l
file determine file type
find [eg] find /usr -name filename -print
mkdir
rmdir
cp -rvi
mv move or rename file or directory
rm remove file or directory
-rfiv
>> append to file
> [eg] ls -al > dir.txt
| [eg] ls | grep conf
chmod
chown
tar
gzip
zip zip [-ruf] zipfile file | directory
-r include the sub direcories
-u update, add the changed files and the new files
-f add only the changed files
unzip unzip zipfile [-d directory]
-d specify the output directory
lpr print file
lpq
lprm
Disk Operation
mount [eg] mount -t msdos /dev/sda1 /mnt/usb
mount -t vfat /dev/hda1 /mnt/win_c
mount /dev/fd0 /mnt/floppy
mount /dev/cdrom -o ischarset=cp950 /mnt/cdrom
mount -o loop file.iso /mnt/cdrom
unmount [eg] unmount /mnt/cdrom
df
format
mkbootdisk
Text Edit
cat concatenate
[eg] cat file >> file2
cat file1 file2 > file3
head
tail
grep [eg] grep text *.conf
more
less
vi -r list swap files
-r {file} recovery mode
-R read-only mode
User Management
useradd
userdel
groupadd
groupdel
passwd
su
who
last
w
whoami
Process Management
ps
kill
fg
Ctrl + z
Help
man
whereis
info
Log
login
logout
exit
shutdown
reboot
rlogin
Other
date
clock
ntpdate
cal
setup
date 2004-01
====================================================
COMMAND REF
File And Directory
pwd
cd change directory
ls -a
-s
-l
file determine file type
find [eg] find /usr -name filename -print
mkdir
rmdir
cp -rvi
mv move or rename file or directory
rm remove file or directory
-rfiv
>> append to file
> [eg] ls -al > dir.txt
| [eg] ls | grep conf
chmod
chown
tar
gzip
zip zip [-ruf] zipfile file | directory
-r include the sub direcories
-u update, add the changed files and the new files
-f add only the changed files
unzip unzip zipfile [-d directory]
-d specify the output directory
lpr print file
lpq
lprm
Disk Operation
mount [eg] mount -t msdos /dev/sda1 /mnt/usb
mount -t vfat /dev/hda1 /mnt/win_c
mount /dev/fd0 /mnt/floppy
mount /dev/cdrom -o ischarset=cp950 /mnt/cdrom
mount -o loop file.iso /mnt/cdrom
unmount [eg] unmount /mnt/cdrom
df
format
mkbootdisk
Text Edit
cat concatenate
[eg] cat file >> file2
cat file1 file2 > file3
head
tail
grep [eg] grep text *.conf
more
less
vi -r list swap files
-r {file} recovery mode
-R read-only mode
User Management
useradd
userdel
groupadd
groupdel
passwd
su
who
last
w
whoami
Process Management
ps
kill
fg
Ctrl + z
Help
man
whereis
info
Log
login
logout
exit
shutdown
reboot
rlogin
Other
date
clock
ntpdate
cal
setup