$ su - root
Password : ********
#
or
# halt
# shutdown -h now
or
# reboot
# shutdown -r now
staff:x:500:
trainee:x:501:
# useradd hoge -g staff
# passwd hoge
# mount /mnt/cdrom
# umount /mnt/cdrom
# eject
Edit like this
# crontab -u root -e
0 4 * * * /root/bin/test
| Colums | |
|---|---|
| 1 | minute |
| 2 | hour |
| 3 | month |
| 4 | year |
| 5 | day of week(0:Sunday, 1:Monday, ...7:Saturday) |
# rpm -ivh package.rpm
# rpm --rebuild package.src.rpm
# rpm -Uvh package.rpm
# rpm -e package
# rpm -qa | less
# rpm -qi apache
# rpm -ql apache
# rpm -qf /etc/passwd
setup-2.5.12-1
# rpm -q --requires apache
# rpm -qR apache
# df
Filesystem 1024-blocks Used Available Capacity Mounted on
/dev/hda7 256592 201147 42193 83% /
/dev/hda8 256592 74744 168596 31% /home
/dev/hda5 1732961 476993 1166408 29% /usr
/dev/hda6 1732961 430138 1213263 26% /var
# /etc/bashrc
# System wide functions and aliases
# Environment stuff goes in /etc/profile
alias llmo="ls -lt | less"
................
# init 1
# fdisk
# mkfs -t ext2 /dev/hdxx
# mkdir /usr2
# mount -t ext2 /dev/hdxx /usr2
# cd /usr
# tar cvf - . | ( cd /usr2; tar xpf - )
# umount /usr2
# rmdir /usr2
# mv /usr /usr.bak
# mkdir /usr
# mount -t ext2 /dev/hdxx /usr
# startx
...............
# cp -p /etc/fstab /etc/fstab.bak
# vi fstab
/dev/hda1 / ext2 defaults 1 1
/dev/hdxx /usr ext2 defaults 1 1
/dev/hda5 swap swap defaults 0 0
/dev/fd0 /mnt/floppy ext2 user,noauto 0 0
/dev/cdrom /mnt/cdrom iso9660 user,exec,noauto,ro 0 0
none /proc proc defaults 0 0
# shutdown -r now
# mount -a
# rm -fr /usr.bak
# df
# tar cvf /dev/rst0 /usr
# tar tvf /tmp/etcbackup.tar
# tar cvf /tmp/etcbackup.tar /etc
# tar xvf /tmp/etc/backup.tar
# tar zcvf log.tar.gz log
# tar zxvf log.tar.gz
# ls -lt test.tgz
-rw-r--r-- 1 root root 604160 Aug 26 05:31 test.tgz
# compress test.tgz
# ls -lt test.tgz*
-rw-r--r-- 1 root root 56373 Aug 26 05:31 test.tgz.Z
#
# ls -lt test.tgz*
-rw-r--r-- 1 root root 56373 Aug 26 05:31 test.tgz.Z
# uncompress test.tgz.Z
# ls -lt test.tgz
-rw-r--r-- 1 root root 604160 Aug 26 05:31 test.tgz
...
alias dsk='du -ks * .* | sort -n'
...
# cd /home
# dsk
du: ../proc/4620/fd/4: No such file or directory
1 samba
12 lost+found
386 hoge
1068 ftp
1541 httpd
3009 .
342510 ..
# cd /
# dsk
du: proc/4622/fd/4: No such file or directory
du: ./proc/4622/fd/4: No such file or directory
du: ../proc/4622/fd/4: No such file or directory
0 proc
3 mnt
12 lost+found
39 dev
635 boot
654 root
1156 tmp
2245 sbin
2274 etc
3009 home
3871 bin
8919 var
12333 lib
307359 usr
342510 .
342510 ..
...
/dev/sdb1: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
(i.e., without -a or -p options)
----------------------------------
*** An error occurred during the file system check.
*** Dropption you to a shell; the system will reboot
*** when you leave the shell.
Givi root password for maintenance
(or type Control-D for normal startup): Password
# /sbin/e2fsck /dev/sdb1
Copyright © [- SroNey / JohN -]. All rights reserved