2019.7.24 jobs

Work on the machine :

1 , please find out with the command ifconfig absolute path command program

[root@localhost ~]# 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 ~]# type cd

cd is a shell built ( we can see the command cd internal command )

pwd is a shell built  ( we can see the command pwd internal command )

ls is `ls --color = auto ' alias  (external)

ifconfig is / usr / sbin / ifconfig   (external)

du Shi / Usr / Bin / du     (external)

 

 

 

3 , in the / create directory abc      [the WWW root @ ~] # cd /

[root@www /]# mkdir abc

[root@www /]#

 

   Please / Create a directory / 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"

 

   Please / abc first created under the 1000 directory, to develop their own name.

root@www abc]# mkdir  {1..1000}.xiongda

[root@www abc]# ls

 

 

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 @ www ~] # cd / liangjian / liyunlong / weiheshang / duanpeng /

[root@www duanpeng]# pwd

/ Liangjian / liyunlong / weiheshang / duanpeng

[root@www duanpeng]# cd ../..

[Root @ www 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@www abc]# rm -rf {1..1000}

[root@www abc]# ls

 

 

[root@www abc]# touch {1..20}stu.txt

[root@www abc]# ls

 

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@www ~]# cp /boot/vm*  /abc

cp : overwrite "/ abc / vmlinuz-0-Rescue-5ef1eba78405426885a1757b846b94bd" ? y

cp : overwrite "/abc/vmlinuz-3.10.0-693.el7.x86_64" ? y

 

 

[Root @ www ~] # du -sh / boot / vm *

5.7M /boot/vmlinuz-0-rescue-5ef1eba78405426885a1757b846b94bd

5.7M /boot/vmlinuz-3.10.0-693.el7.x86_64

 

 

7 , in which a vmlinuz beginning of the file is renamed KGC , a further cut to / tmp directory.

 [root@www abc]# mv vmlinuz-0-rescue-5ef1eba78405426885a1757b846b94bd  kgc

 

[root@www abc]# mv vm* /tmp

 

8 , see the / tmp / to the directory vmlinuz detail beginning of the file status information.

 

 

[root@www ~]# stat /tmp/vm*

 

 

9 , with find find command / tmp to directory vmlinuz beginning and larger than 1M file

 

 

[root@www ~]# find /tmp -size +1M -a -name "vm*"

/tmp/vmlinuz-3.10.0-693.el7.x86_64

 

Guess you like

Origin www.cnblogs.com/otherwise/p/11235997.html