1, please find out with the command ifconfig absolute path command program
[root@localhost chen]# which ifconfig
/usr/sbin/ifconfig
2 , please use the following command to display the command which is an internal command, which is an external command ? (Cd \ pwd \ ls \ ifconfig \ du)
[root@localhost chen]# type cd
cd is a shell built (we can see the command cd internal command)
[root@localhost chen]# type pwd
pwd is a shell built (we can see the command shell internal command)
[root@localhost chen]# type ls
ls is `ls --color = auto ' alias (Thus the command ls external command)
[root@localhost chen]# type ifconfig
ifconfig is / usr / sbin / ifconfig (Thus the command ifconfig external command)
[root@localhost chen]# type du
du is / usr / bin / du (Thus the order du external command)
3 . Please / create directory abc
[root@localhost chen]# mkdir /abc
[root@localhost chen]# ls /
101 bin dev home lib64 mnt proc run srv tmp var
abc boot etc lib media opt root sbin sys usr
Please / Create a directory / liangjian / liyunlong / weiheshang / duanpeng
[Root @ localhost chen] # mkdir -pv / liangjian / liyunlong / weiheshang / duanpeng
mkdir: we have created the directory "/ liangjian"
mkdir: it has created the directory "/ liangjian / liyunlong"
mkdir: you have created the directory "/ liangjian / liyunlong / weiheshang"
mkdir: you have created the directory "/ liangjian / liyunlong / weiheshang / duanpeng"
[root@localhost chen]# ls -Rh /liangjian
/ Liangjian:
liyunlong
/ Liangjian / liyunlong:
weiheshang
/ Liangjian / liyunlong / weiheshang:
duanpeng
/ Liangjian / liyunlong / weiheshang / duanpeng:
Please / abc first created under the 1000 directory, to develop their own name.
[root@localhost chen]# mkdir -p /abc/a{1..1000}
[root@localhost chen]# ls /abc
a1 a168 a237 a306 a376 a445 a514 a584 a653 a722 a792 a861 a930
a10 a100 a17 a239 a308 a378 a447 a516 a586 a655 a724 a794 a1000 a170 a24 a309 a379 a448 a517 a587 a656 a725 a795 a864
...... a166 a235 a304 a374 a443 a512 a582 a651 a720 a790 a86 a929 a999
a167 a236 a305 a375 a444 a513 a583 a652 a721 a791 a860 a93
4 , a switch to mode absolute path / liangjian / liyunlong / weiheshang / duanpeng directory
And with pwd view the current path, with the name of the parent directory ".." to switch to the mode / liangjian / liyunlong down
[Root @ localhost duanpeng] # cd / liangjian / liyunlong / weiheshang / duanpeng
[root@localhost duanpeng]# pwd
/ Liangjian / liyunlong / weiheshang / duanpeng
[root@localhost duanpeng]# cd ../../
[root@localhost liyunlong]# pwd
/ Liangjian / liyunlong
5 , delete the first / abc next time you create a 1000 directory, in the / abc case with touch and then create 20 Ge to stu beginning of ordinary readable document, the document suffix .txt
[root@localhost liyunlong]# rm -rf /abc/a*
[root@localhost liyunlong]# touch /abc/stu{1..20}.txt
[root@localhost liyunlong]# ls /abc/
stu10.txt stu13.txt stu16.txt stu19.txt stu2.txt stu5.txt stu8.txt
stu11.txt stu14.txt stu17.txt stu1.txt stu3.txt stu6.txt stu9.txt
stu12.txt stu15.txt stu18.txt stu20.txt stu4.txt stu7.txt
6 , please use the cp command / boot / directory to vmlinuz files are copied to the beginning / abc lower, and to see the size of the disk space they occupy.
[root@localhost ~]# ls /boot/
config-3.10.0-862.el7.x86_64
efi
grub
grub2
initramfs-0-rescue-a98e3946315a4366a69c9cccd8aca211.img
initramfs-3.10.0-862.el7.x86_64.img
symvers-3.10.0-862.el7.x86_64.gz
System.map-3.10.0-862.el7.x86_64
vmlinuz-0-rescue-a98e3946315a4366a69c9cccd8aca211
vmlinuz-3.10.0-862.el7.x86_64
[root@localhost ~]# cp /boot/vmlinuz* /abc
[root@localhost ~]# ls /abc
stu10.txt stu16.txt stu2.txt stu8.txt
stu11.txt stu17.txt stu3.txt stu9.txt
stu12.txt stu18.txt stu4.txt vmlinuz-0-rescue-a98e3946315a4366a69c9cccd8aca211
stu13.txt stu19.txt stu5.txt vmlinuz-3.10.0-862.el7.x86_64
stu14.txt stu1.txt stu6.txt
stu15.txt stu20.txt stu7.txt
[root@localhost ~]# du -ah /abc/
0 /abc/stu1.txt
0 /abc/stu2.txt
0 /abc/stu3.txt
0 /abc/stu4.txt
0 /abc/stu5.txt
0 /abc/stu6.txt
0 /abc/stu7.txt
0 /abc/stu8.txt
0 /abc/stu9.txt
0 /abc/stu10.txt
0 /abc/stu11.txt
0 /abc/stu12.txt
0 /abc/stu13.txt
0 /abc/stu14.txt
0 /abc/stu15.txt
0 /abc/stu16.txt
0 /abc/stu17.txt
0 /abc/stu18.txt
0 /abc/stu19.txt
0 /abc/stu20.txt
6.0M /abc/vmlinuz-0-rescue-a98e3946315a4366a69c9cccd8aca211
6.0M /abc/vmlinuz-3.10.0-862.el7.x86_64
12M /abc/
7 , in which a vmlinuz beginning of the file is renamed KGC , a further cut to / tmp directory.
[root@localhost abc]# ls
stu10.txt stu16.txt stu2.txt stu8.txt
stu11.txt stu17.txt stu3.txt stu9.txt
stu12.txt stu18.txt stu4.txt vmlinuz-0-rescue-a98e3946315a4366a69c9cccd8aca211
stu13.txt stu19.txt stu5.txt vmlinuz-3.10.0-862.el7.x86_64
stu14.txt stu1.txt stu6.txt
stu15.txt stu20.txt stu7.txt
[root@localhost abc]# mv vmlinuz-3.10.0-862.el7.x86_64 kgc
[root@localhost abc]# ls
kgc stu15.txt stu20.txt stu7.txt
stu10.txt stu16.txt stu2.txt stu8.txt
stu11.txt stu17.txt stu3.txt stu9.txt
stu12.txt stu18.txt stu4.txt vmlinuz-0-rescue-a98e3946315a4366a69c9cccd8aca211
stu13.txt stu19.txt stu5.txt
stu14.txt stu1.txt stu6.txt
[root@localhost abc]# mv vmlinuz-0-rescue-a98e3946315a4366a69c9cccd8aca211 /tmp/
[root@localhost abc]# ls /tmp/
…
vmlinuz-0-rescue-a98e3946315a4366a69c9cccd8aca211
8 , see the / tmp / to the directory vmlinuz detail beginning of the file status information.
[root@localhost abc]# stat /tmp/vmlinuz*
文件:"/tmp/vmlinuz-0-rescue-a98e3946315a4366a69c9cccd8aca211"
Size: 6224704 block: 12160 IO block: 4096 regular file
Equipment: fd00h / 64768d Inode : 102 882 318 Hard Links: 1
Permissions: (0755 / XR--rwxr-X) Uid : (0 / the root) Gid : (0 / the root)
Last Visit: 2019-07-2320: 01: 47.568656306 +0800
Recent changes: 2019-07-2320: 01: 48.051660464 +0800
Recent changes: 2019-07-2320: 11: 48.088912567 +0800
Created: -
9 , with find find command / tmp to directory vmlinuz beginning and larger than 1M file
[root@localhost abc]# find /tmp -name "vmlinuz*" -a -size +1M
/tmp/vmlinuz-0-rescue-a98e3946315a4366a69c9cccd8aca211