课程第4次
# lsanaconda-ks.cfgDesktopDocumentsDownloadsMusicoriginal-ks.cfgPicturesPublicTemplatesVideos
# cd /dev/
# ls
agpgart log sda2 tty23tty49 usbmon1
autofs loop-control sda3 tty24tty5 usbmon2
block lp0 sg0 tty25tty50 vcs
bsg lp1 sg1 tty26tty51 vcs1
btrfs-control lp2 shm tty27tty52 vcs2
bus lp3 snapshottty28tty53 vcs3
cdrom mapper snd tty29tty54 vcs4
char mcelog sr0 tty3 tty55 vcs5
console mem stderr tty30tty56 vcs6
core midi stdin tty31tty57 vcsa
cpu mqueue stdout tty32tty58 vcsa1
cpu_dma_latencynet tty tty33tty59 vcsa2
crash network_latency tty0 tty34tty6 vcsa3
disk network_throughputtty1 tty35tty60 vcsa4
dm-0 null tty10 tty36tty61 vcsa5
dmmidi nvram tty11 tty37tty62 vcsa6
dri oldmem tty12 tty38tty63 vfio
fb0 port tty13 tty39tty7 vga_arbiter
fd ppp tty14 tty4 tty8 vhci
full ptmx tty15 tty40tty9 vhost-net
fuse pts tty16 tty41ttyS0 vmci
hidraw0 random tty17 tty42ttyS1 vsock
hpet raw tty18 tty43ttyS2 zero
hugepages rhel tty19 tty44ttyS3
hwrng rtc tty2 tty45uhid
initctl rtc0 tty20 tty46uinput
input sda tty21 tty47urandom
kmsg sda1 tty22 tty48usbmon0
# ls -l
total 0
crw-rw----. 1 root video 10, 175 Dec 21 05:25 agpgart
crw-------. 1 root root 10, 235 Dec 21 05:25 autofs
drwxr-xr-x. 2 root root 160 Dec 21 05:25 block
drwxr-xr-x. 2 root root 80 Dec 21 05:25 bsg
crw-------. 1 root root 10, 234 Dec 21 05:25 btrfs-control
drwxr-xr-x. 3 root root 60 Dec 21 05:25 bus
lrwxrwxrwx. 1 root root 3 Dec 21 05:25 cdrom -> sr0
drwxr-xr-x. 2 root root 3040 Dec 21 05:27 char
crw-------. 1 root root 5, 1 Dec 21 05:26 console
lrwxrwxrwx. 1 root root 11 Dec 21 05:25 core -> /proc/kcore
drwxr-xr-x. 3 root root 60 Dec 21 05:25 cpu
crw-------. 1 root root 10,61 Dec 21 05:25 cpu_dma_latency
crw-------. 1 root root 10,62 Dec 21 05:25 crash
drwxr-xr-x. 5 root root 100 Dec 21 05:25 disk
brw-rw----. 1 root disk 253, 0 Dec 21 05:25 dm-0
crw-rw----+ 1 root audio 14, 9 Dec 21 05:25 dmmidi
drwxr-xr-x. 2 root root 80 Dec 21 05:25 dri
crw-rw----. 1 root video 29, 0 Dec 21 05:25 fb0
lrwxrwxrwx. 1 root root 13 Dec 21 05:25 fd -> /proc/self/fd
crw-rw-rw-. 1 root root 1, 7 Dec 21 05:25 full
crw-rw-rw-. 1 root root 10, 229 Dec 21 05:27 fuse
crw-------. 1 root root 246, 0 Dec 21 05:25 hidraw0
crw-------. 1 root root 10, 228 Dec 21 05:25 hpet
drwxr-xr-x. 3 root root 0 Dec 21 05:26 hugepages
crw-------. 1 root root 10, 183 Dec 21 05:25 hwrng
lrwxrwxrwx. 1 root root 25 Dec 21 05:25 initctl -> /run/systemd/initctl/fifo
drwxr-xr-x. 4 root root 300 Dec 21 05:25 input
crw-r--r--. 1 root root 1,11 Dec 21 05:25 kmsg
srw-rw-rw-. 1 root root 0 Dec 21 05:25 log
crw-rw----. 1 root disk 10, 237 Dec 21 05:25 loop-control
crw-rw----. 1 root lp 6, 0 Dec 21 05:25 lp0
crw-rw----. 1 root lp 6, 1 Dec 21 05:25 lp1
crw-rw----. 1 root lp 6, 2 Dec 21 05:25 lp2
crw-rw----. 1 root lp 6, 3 Dec 21 05:25 lp3
drwxr-xr-x. 2 root root 80 Dec 21 05:25 mapper
crw-------. 1 root root 10, 227 Dec 21 05:25 mcelog
crw-r-----. 1 root kmem 1, 1 Dec 21 05:25 mem
crw-rw----+ 1 root audio 14, 2 Dec 21 05:25 midi
drwxrwxrwt. 2 root root 40 Dec 21 05:25 mqueue
drwxr-xr-x. 2 root root 60 Dec 21 05:25 net
crw-------. 1 root root 10,60 Dec 21 05:25 network_latency
crw-------. 1 root root 10,59 Dec 21 05:25 network_throughput
crw-rw-rw-. 1 root root 1, 3 Dec 21 05:25 null
crw-------. 1 root root 10, 144 Dec 21 05:25 nvram
crw-------. 1 root root 1,12 Dec 21 05:25 oldmem
crw-r-----. 1 root kmem 1, 4 Dec 21 05:25 port
crw-------. 1 root root 108, 0 Dec 21 05:25 ppp
crw-rw-rw-. 1 root tty 5, 2 Dec 21 20:11 ptmx
drwxr-xr-x. 2 root root 0 Dec 21 05:25 pts
crw-rw-rw-. 1 root root 1, 8 Dec 21 05:25 random
drwxr-xr-x. 2 root root 60 Dec 21 05:25 raw
drwxr-xr-x. 2 root root 60 Dec 21 05:25 rhel
lrwxrwxrwx. 1 root root 4 Dec 21 05:25 rtc -> rtc0
crw-------. 1 root root 252, 0 Dec 21 05:25 rtc0
brw-rw----. 1 root disk 8, 0 Dec 21 05:25 sda
brw-rw----. 1 root disk 8, 1 Dec 21 05:25 sda1
brw-rw----. 1 root disk 8, 2 Dec 21 05:25 sda2
brw-rw----. 1 root disk 8, 3 Dec 21 05:25 sda3
crw-rw----. 1 root disk 21, 0 Dec 21 05:25 sg0
crw-rw----+ 1 root cdrom 21, 1 Dec 21 05:25 sg1
drwxrwxrwt. 2 root root 40 Dec 21 05:28 shm
crw-------. 1 root root 10, 231 Dec 21 05:25 snapshot
drwxr-xr-x. 3 root root 200 Dec 21 05:25 snd
brw-rw----+ 1 root cdrom 11, 0 Dec 21 05:25 sr0
lrwxrwxrwx. 1 root root 15 Dec 21 05:25 stderr -> /proc/self/fd/2
lrwxrwxrwx. 1 root root 15 Dec 21 05:25 stdin -> /proc/self/fd/0
lrwxrwxrwx. 1 root root 15 Dec 21 05:25 stdout -> /proc/self/fd/1
crw-rw-rw-. 1 root tty 5, 0 Dec 21 05:25 tty
crw--w----. 1 root tty 4, 0 Dec 21 05:25 tty0
crw--w----. 1 root tty 4, 1 Dec 21 05:26 tty1
crw--w----. 1 root tty 4,10 Dec 21 05:25 tty10
crw--w----. 1 root tty 4,11 Dec 21 05:25 tty11
crw--w----. 1 root tty 4,12 Dec 21 05:25 tty12
crw--w----. 1 root tty 4,13 Dec 21 05:25 tty13
crw--w----. 1 root tty 4,14 Dec 21 05:25 tty14
crw--w----. 1 root tty 4,15 Dec 21 05:25 tty15
crw--w----. 1 root tty 4,16 Dec 21 05:25 tty16
crw--w----. 1 root tty 4,17 Dec 21 05:25 tty17
crw--w----. 1 root tty 4,18 Dec 21 05:25 tty18
crw--w----. 1 root tty 4,19 Dec 21 05:25 tty19
crw--w----. 1 root tty 4, 2 Dec 21 05:25 tty2
crw--w----. 1 root tty 4,20 Dec 21 05:25 tty20
crw--w----. 1 root tty 4,21 Dec 21 05:25 tty21
crw--w----. 1 root tty 4,22 Dec 21 05:25 tty22
crw--w----. 1 root tty 4,23 Dec 21 05:25 tty23
crw--w----. 1 root tty 4,24 Dec 21 05:25 tty24
crw--w----. 1 root tty 4,25 Dec 21 05:25 tty25
crw--w----. 1 root tty 4,26 Dec 21 05:25 tty26
crw--w----. 1 root tty 4,27 Dec 21 05:25 tty27
crw--w----. 1 root tty 4,28 Dec 21 05:25 tty28
crw--w----. 1 root tty 4,29 Dec 21 05:25 tty29
crw--w----. 1 root tty 4, 3 Dec 21 05:25 tty3
crw--w----. 1 root tty 4,30 Dec 21 05:25 tty30
crw--w----. 1 root tty 4,31 Dec 21 05:25 tty31
crw--w----. 1 root tty 4,32 Dec 21 05:25 tty32
crw--w----. 1 root tty 4,33 Dec 21 05:25 tty33
crw--w----. 1 root tty 4,34 Dec 21 05:25 tty34
crw--w----. 1 root tty 4,35 Dec 21 05:25 tty35
crw--w----. 1 root tty 4,36 Dec 21 05:25 tty36
crw--w----. 1 root tty 4,37 Dec 21 05:25 tty37
crw--w----. 1 root tty 4,38 Dec 21 05:25 tty38
crw--w----. 1 root tty 4,39 Dec 21 05:25 tty39
crw--w----. 1 root tty 4, 4 Dec 21 05:25 tty4
crw--w----. 1 root tty 4,40 Dec 21 05:25 tty40
crw--w----. 1 root tty 4,41 Dec 21 05:25 tty41
crw--w----. 1 root tty 4,42 Dec 21 05:25 tty42
crw--w----. 1 root tty 4,43 Dec 21 05:25 tty43
crw--w----. 1 root tty 4,44 Dec 21 05:25 tty44
crw--w----. 1 root tty 4,45 Dec 21 05:25 tty45
crw--w----. 1 root tty 4,46 Dec 21 05:25 tty46
crw--w----. 1 root tty 4,47 Dec 21 05:25 tty47
crw--w----. 1 root tty 4,48 Dec 21 05:25 tty48
crw--w----. 1 root tty 4,49 Dec 21 05:25 tty49
crw--w----. 1 root tty 4, 5 Dec 21 05:25 tty5
crw--w----. 1 root tty 4,50 Dec 21 05:25 tty50
crw--w----. 1 root tty 4,51 Dec 21 05:25 tty51
crw--w----. 1 root tty 4,52 Dec 21 05:25 tty52
crw--w----. 1 root tty 4,53 Dec 21 05:25 tty53
crw--w----. 1 root tty 4,54 Dec 21 05:25 tty54
crw--w----. 1 root tty 4,55 Dec 21 05:25 tty55
crw--w----. 1 root tty 4,56 Dec 21 05:25 tty56
crw--w----. 1 root tty 4,57 Dec 21 05:25 tty57
crw--w----. 1 root tty 4,58 Dec 21 05:25 tty58
crw--w----. 1 root tty 4,59 Dec 21 05:25 tty59
crw--w----. 1 root tty 4, 6 Dec 21 05:25 tty6
crw--w----. 1 root tty 4,60 Dec 21 05:25 tty60
crw--w----. 1 root tty 4,61 Dec 21 05:25 tty61
crw--w----. 1 root tty 4,62 Dec 21 05:25 tty62
crw--w----. 1 root tty 4,63 Dec 21 05:25 tty63
crw--w----. 1 root tty 4, 7 Dec 21 05:25 tty7
crw--w----. 1 root tty 4, 8 Dec 21 05:25 tty8
crw--w----. 1 root tty 4, 9 Dec 21 05:25 tty9
crw-rw----. 1 root dialout 4,64 Dec 21 05:25 ttyS0
crw-rw----. 1 root dialout 4,65 Dec 21 05:25 ttyS1
crw-rw----. 1 root dialout 4,66 Dec 21 05:25 ttyS2
crw-rw----. 1 root dialout 4,67 Dec 21 05:25 ttyS3
crw-------. 1 root root 10, 239 Dec 21 05:25 uhid
crw-------. 1 root root 10, 223 Dec 21 05:25 uinput
crw-rw-rw-. 1 root root 1, 9 Dec 21 05:25 urandom
crw-------. 1 root root 247, 0 Dec 21 05:25 usbmon0
crw-------. 1 root root 247, 1 Dec 21 05:25 usbmon1
crw-------. 1 root root 247, 2 Dec 21 05:25 usbmon2
crw-rw----. 1 root tty 7, 0 Dec 21 05:25 vcs
crw-rw----. 1 root tty 7, 1 Dec 21 05:25 vcs1
crw-rw----. 1 root tty 7, 2 Dec 21 05:26 vcs2
crw-rw----. 1 root tty 7, 3 Dec 21 05:26 vcs3
crw-rw----. 1 root tty 7, 4 Dec 21 05:26 vcs4
crw-rw----. 1 root tty 7, 5 Dec 21 05:26 vcs5
crw-rw----. 1 root tty 7, 6 Dec 21 05:26 vcs6
crw-rw----. 1 root tty 7, 128 Dec 21 05:25 vcsa
crw-rw----. 1 root tty 7, 129 Dec 21 05:25 vcsa1
crw-rw----. 1 root tty 7, 130 Dec 21 05:26 vcsa2
crw-rw----. 1 root tty 7, 131 Dec 21 05:26 vcsa3
crw-rw----. 1 root tty 7, 132 Dec 21 05:26 vcsa4
crw-rw----. 1 root tty 7, 133 Dec 21 05:26 vcsa5
crw-rw----. 1 root tty 7, 134 Dec 21 05:26 vcsa6
drwxr-xr-x. 2 root root 60 Dec 21 05:25 vfio
crw-------. 1 root root 10,63 Dec 21 05:25 vga_arbiter
crw-------. 1 root root 10, 137 Dec 21 05:25 vhci
crw-------. 1 root root 10, 238 Dec 21 05:25 vhost-net
crw-------. 1 root root 10,58 Dec 21 05:25 vmci
crw-------. 1 root root 10,57 Dec 21 05:26 vsock
crw-rw-rw-. 1 root root 1, 5 Dec 21 05:25 zero
#
------
Last login: Sat Dec 21 05:19:25 2019 from desktop41.example.com
# pwd
/root
# ls -l
total 4
-rw-------. 1 root root 2344 Dec 17 07:01 anaconda-ks.cfg
drwxr-xr-x. 2 root root 6 Dec 17 07:20 Desktop
drwxr-xr-x. 2 root root 6 Dec 17 07:20 Documents
drwxr-xr-x. 2 root root 6 Dec 17 07:20 Downloads
drwxr-xr-x. 2 root root 32 Dec 21 06:17 labs
drwxr-xr-x. 2 root root 6 Dec 17 07:20 Music
drwxr-xr-x. 2 root root 6 Dec 17 07:20 Pictures
drwxr-xr-x. 2 root root 6 Dec 17 07:20 Public
drwxr-xr-x. 2 root root 6 Dec 17 07:20 Templates
drwxr-xr-x. 2 root root 6 Dec 17 07:20 Videos
# cd labs
# ls
1.txt2.txt
# vim 3.txt
1234567890
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
"3.txt" 1L, 11C written
# wc -c 3.txt
11 3.txt
# cat3.txt
1234567890
# cat -A3.txt
1234567890$
# ls -l *
-rw-r--r--. 1 root root8 Dec 20 20:35 1.txt
-rw-r--r--. 1 root root 32 Dec 21 06:16 2.txt
-rw-r--r--. 1 root root 11 Dec 21 20:19 3.txt
# ln -s 3.txt4.txt
# ls -l *
-rw-r--r--. 1 root root8 Dec 20 20:35 1.txt
-rw-r--r--. 1 root root 32 Dec 21 06:16 2.txt
-rw-r--r--. 1 root root 11 Dec 21 20:19 3.txt
lrwxrwxrwx. 1 root root5 Dec 21 20:23 4.txt -> 3.txt
# ls -l 4.txt
lrwxrwxrwx. 1 root root 5 Dec 21 20:23 4.txt -> 3.txt
# chmod g=rw 3.txt
# ls -i3.txt
51201536 3.txt
# ls -l 3.txt
-rw-rw-r--. 1 root root 11 Dec 21 20:19 3.txt
# chmod o-r 3.txt
# ls -l 3.txt
-rw-rw----. 1 root root 11 Dec 21 20:19 3.txt
# chmod 640 3.txt
# ls -l 3.txt
-rw-r-----. 1 root root 11 Dec 21 20:19 3.txt
# cd ..
# ls -l
total 4
-rw-------. 1 root root 2344 Dec 17 07:01 anaconda-ks.cfg
drwxr-xr-x. 2 root root 6 Dec 17 07:20 Desktop
drwxr-xr-x. 2 root root 6 Dec 17 07:20 Documents
drwxr-xr-x. 2 root root 6 Dec 17 07:20 Downloads
drwxr-xr-x. 2 root root 58 Dec 21 20:23 labs
drwxr-xr-x. 2 root root 6 Dec 17 07:20 Music
drwxr-xr-x. 2 root root 6 Dec 17 07:20 Pictures
drwxr-xr-x. 2 root root 6 Dec 17 07:20 Public
drwxr-xr-x. 2 root root 6 Dec 17 07:20 Templates
drwxr-xr-x. 2 root root 6 Dec 17 07:20 Videos
# cd labs
# ls
1.txt2.txt3.txt4.txt
# ls -a
...1.txt2.txt3.txt4.txt
# ls -ia
51201526 . 33636129 1.txt51201536 3.txt
33574977 ..51201553 2.txt51201535 4.txt
# ls -id
51201526 .
# ls -id /
64 /
# ls -id /root/labs/
51201526 /root/labs/
# ls -id /root
33574977 /root
# cd .
# cd ..
# ls -l
total 4
-rw-------. 1 root root 2344 Dec 17 07:01 anaconda-ks.cfg
drwxr-xr-x. 2 root root 6 Dec 17 07:20 Desktop
drwxr-xr-x. 2 root root 6 Dec 17 07:20 Documents
drwxr-xr-x. 2 root root 6 Dec 17 07:20 Downloads
drwxr-xr-x. 2 root root 58 Dec 21 20:23 labs
drwxr-xr-x. 2 root root 6 Dec 17 07:20 Music
drwxr-xr-x. 2 root root 6 Dec 17 07:20 Pictures
drwxr-xr-x. 2 root root 6 Dec 17 07:20 Public
drwxr-xr-x. 2 root root 6 Dec 17 07:20 Templates
drwxr-xr-x. 2 root root 6 Dec 17 07:20 Videos
# cd labs
# ls
1.txt2.txt3.txt4.txt
# df -h
Filesystem SizeUsed Avail Use% Mounted on
/dev/mapper/rhel-root 18G3.6G 14G21% /
devtmpfs 894M 0894M 0% /dev
tmpfs 910M 0910M 0% /dev/shm
tmpfs 910M 11M900M 2% /run
tmpfs 910M 0910M 0% /sys/fs/cgroup
/dev/sda1 297M161M137M54% /boot
tmpfs 182M 12K182M 1% /run/user/42
tmpfs 182M 0182M 0% /run/user/0
# ls -id /boot
64 /boot
# umount/boot
# ls -id /boot
67 /boot
# mount -a
# ls -id /boot
64 /boot
# pwd
/root/labs
# ls
1.txt2.txt3.txt4.txt
# ls -l
total 12
-rw-r--r--. 1 root root8 Dec 20 20:35 1.txt
-rw-r--r--. 1 root root 32 Dec 21 06:16 2.txt
-rw-r-----. 1 root root 11 Dec 21 20:19 3.txt
lrwxrwxrwx. 1 root root5 Dec 21 20:23 4.txt -> 3.txt
# ln 3.txt /tmp/5.txt
# ls -l
total 12
-rw-r--r--. 1 root root8 Dec 20 20:35 1.txt
-rw-r--r--. 1 root root 32 Dec 21 06:16 2.txt
-rw-r-----. 2 root root 11 Dec 21 20:19 3.txt
lrwxrwxrwx. 1 root root5 Dec 21 20:23 4.txt -> 3.txt
# ls -i 3.txt
51201536 3.txt
# ls -i /tmp/5.txt
51201536 /tmp/5.txt
#
# ssh 192.168.0.104 dd if=/root/labs/a.img bs=4M > /dev/sdb3
root@192.168.0.104's password:
50+0 records in
50+0 records out
209715200 bytes (210 MB) copied, 1.34381 s, 156 MB/s
# mount-a
mount: wrong fs type, bad option, bad superblock on /dev/sdb3,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so.
mount: can't find LABEL=bird
唐老师,将sdb3拷贝回来之后挂载提示这个错误是什么 Rassss 发表于 2019-12-24 23:09
# ssh 192.168.0.104 dd if=/root/labs/a.img bs=4M > /dev/sdb3
's password:
50+ ...
xfs吗,如果是,bs=1,否则可能不行。
页:
[1]