7.23 on machine operation

Work on the machine:

1 , please use the command ifconfig find out the absolute path of the 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)

[root@localhost ~]# type pwd

pwd is a shell built

[root@localhost ~]# type ls

ls is `ls --color = auto 'aliases

[root@localhost ~]# type ifconfig

ifconfig is / usr / sbin / ifconfig (Thus the ifconfig command is an external command)

[root@localhost ~]# type du

du has been hashed (/ usr / bin / du)

3 , in the / create a directory under abc

[root@localhost ~]# mkdir -pv /abc

mkdir: directory has been created "/ abc"

[root@localhost ~]#

   In / create directory / liangjian / liyunlong / weiheshang / duanpeng down

[the root @ localhost ~] # mkdir -pv / liangjian / liyunlong / weiheshang / duanpeng

mkdir: directory has been created "/ liangjian"

mkdir: directory has been created "/ liangjian / liyunlong"

mkdir: directory has been created "/ liangjian / liyunlong / weiheshang"

mkdir: directory has been created "/ liangjian / liyunlong / weiheshang / duanpeng"

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

[root@localhost abc]# mkdir -pv lxh{1..1000}

[root@localhost abc]# ls

lxh1     lxh138  lxh178  lxh217  lxh257  lxh297  lxh336  lxh376  lxh415  lxh455  lxh495  lxh534  lxh574  lxh613  lxh653  lxh693  lxh732  lxh772  lxh811  lxh851

 

4 , switch to / liangjian / liyunlong / weiheshang / duanpeng manner absolute path directory

And with pwd view the current path, with the name of the parent directory ".." to switch to / liangjian / liyunlong way down

[root @ localhost abc] # 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 / abc again next time you create a 1000 directory, in the / abc case with touch and then create up to 20 Ge with stu beginning of ordinary readable document, the document as a .txt extension

[root@localhost abc]# rm -rf *

[root@localhost abc]# ls

[root@localhost abc]#

 

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

[root@localhost abc]# ls

stu10.txt  stu12.txt  stu14.txt  stu16.txt  stu18.txt  stu1.txt   stu2.txt  stu4.txt  stu6.txt  stu8.txt

stu11.txt  stu13.txt  stu15.txt  stu17.txt  stu19.txt  stu20.txt  stu3.txt  stu5.txt  stu7.txt  stu9.txt

6 , please use cp to / boot / command directory to vmlinuz files are copied to the beginning / abc lower, and to see the size of the disk space they occupy.

[root@localhost ~]# cp /boot/vmlinuz* /abc
[root@localhost ~]# ls /abc
stu10.txt  stu12.txt  stu14.txt  stu16.txt  stu18.txt  stu1.txt   stu2.txt  stu4.txt  stu6.txt  stu8.txt  vmlinuz-0-rescue-3d1fd611a8af42619df7f7839dfa5240
stu11.txt  stu13.txt  stu15.txt  stu17.txt  stu19.txt  stu20.txt  stu3.txt  stu5.txt  stu7.txt  stu9.txt  vmlinuz-3.10.0-229.el7.x86_64

[root@localhost ~]# du -h /abc/vmlinuz*

4.8M        /abc/vmlinuz-0-rescue-3d1fd611a8af42619df7f7839dfa5240

4.8M /abc/vmlinuz-3.10.0-229.el7.x86_64

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

[root@localhost ~]# mv /abc/vmlinuz-0-rescue-3d1fd611a8af42619df7f7839dfa5240  /abc/kgc

[root@localhost ~]# ls /abc

kgc        stu11.txt  stu13.txt  stu15.txt  stu17.txt  stu19.txt  stu20.txt  stu3.txt  stu5.txt  stu7.txt  stu9.txt

stu10.txt  stu12.txt  stu14.txt  stu16.txt  stu18.txt  stu1.txt   stu2.txt   stu4.txt  stu6.txt  stu8.txt  vmlinuz-3.10.0-229.el7.x86_64

 

[root@localhost ~]# mv /abc/vmlinuz-3.10.0-229.el7.x86_64 /tmp

[root@localhost ~]# ls /tmp

hsperfdata_root   ssh-jbqYrmgywUee        systemd-private-bZsaKA  vmlinuz-3.10.0-229.el7.x86_64  yum.log

ks-script-orrnFo  systemd-private-0XwnWN  systemd-private-D4pDtE  vmware-root                    yum_save_tx.2019-07-23.09-13.ogrGx4.yumtx

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

[root@localhost ~]# stat /tmp/vmlinuz*

  File: "/ tmp / vmlinuz-3.10.0-229.el7.x86_64"

  Size: 5029136: 9824 IO block: 4096 regular file

Equipment: fd00h / 64768d Inode: 2944993 hard link: 1

Permissions: (0755 / -rwxr-xr-x) Uid :( 0 / root) Gid :( 0 / root)

环境:unconfined_u:object_r:default_t:s0

Last Visit: 2019-07-2317: 28: 04.388410003 +0800

Recent changes: 2019-07-2317: 28: 07.194424245 +0800

Recent changes: 2019-07-2319: 02: 25.592267350 +0800

Created: -

9 , with find find command / tmp to vmlinuz directory at the beginning and the size of more than 1M file

[root@localhost tmp]# find -name vmlinuz* -a -size +1M

./vmlinuz-3.10.0-229.el7.x86_64

 

Guess you like

Origin www.cnblogs.com/lxhtq/p/11234098.html