python 基础0-linux常见命令

ls                         |-show this list
                            |-ls -l show the more information 
                            |- ls -a show a file which is hide
                            |-ls -h
pwd                     |-sh this files' path
cd                        |-inter a path or directory
touch                   |-open a file ,if it do not exist,it will be created
                            |- touch .s.txt means to creat hide a file,ls -a will show it 
mkdir                   |-make directory
                            |-mkdir -p can creat /q/w/e/r/t/y,there are a lot files
rm                        |-delete a file
                            |- rm -f delete file,ignore which is not exist 
                            |-rm -r delete the directory
rm -rf                   |-delete the directory
clear                     |-clean the screen


man command     |-press the key space show  another page
                              |-press the key enter  get a line
                              |-press the key B ,back a page
                              |-press the key f ,get a new page
                              |-press the key Q,quit this page
command --help  |- :express  how to use the command


tab                         |-give the more conmand
                              |-if press twice tab,get the list to choose
cat                         |-watch a file 
                              |-cat -b a.txt,will show a.txt with line-number
                              |-cat -n a.txt,will show a.txt with line-numberlist which for the airline
more                     |-show a file page to page
mv                         |-move a file to another directory,or rename it
cp                          |-copy a file 
echo                      |-show it to screen
                              |-echo >> ,will add it to a file 
                              |-ehco >,will replace it to a file
grep                      |-seacher it in a file
                             |-grep ^XX,means to seacher that which began with XX in a file
                             |-frep XX$,means to seacher thst which end with XX in a file
ifconfig                 |-show the network adapter information

chmod +/- r/w/x a.py|-give the power for file,+ means give,- means collect,r means read,w means write,x means excute,and excute should enter "./a.py"

date                        |-show system time
cal                           |-show system calendar
df                            |-show disk free,show the detail,df -h
du                           |-sh disk usage directory's file,show the detail du -h
ps aux                     |-sh the process,a means all of that,u means the detail,x means show the process which do not controled by the terminal
kill -9 XXX               |-be force to kill the process with the XXX id 
top                          |-list the process       
find Desktop -name "*.py"|-find files that end with .py
                                          |-if give no path,means find in now dirctory
      
ln -s  XX XXX          |-make a easy link for a file to open,soft link,we can open XXX to open XX
                               |-if no give the para ,it is hard link,delete the file,the hard link will not be deleted
tar -cvf   file  files   |-make a lot files to be a big file
                              |-tar -cvfz file files ,will zip this file be a small file
tar -xvf   file           |-make a big file to be a lot files
                               |-tar -vxfz file,will release this file
gzip  file                 |-zip a big file to be a small file,give the file ends with .tar.gz
bzip2 file                |-zip a big file to be a small file,give the file ends with .tar.bz2
tar -jcvf file files    |-zip
tar -jxvf file            |-release the zip file
                              |-tar -jxvf file -C path ,point the release dirctory
apt                         |-sudo apt install XXX,means intall a application
                              |-sudo apt remove XXX,means uninstall
                              |-sudo apt upgrade XXX,means upgrade it
useradd -m -g usergroup_name user_name | -m built the home dirctory for the user 
                                                                       |-g point the user for a usergroup
passwd user_name |-give a password for the user
userdel -r                |-delete the home dicrtory of a  user
cat /etc/passwd | grep |-show a new user information
id user_name
who                         |-show the curtion login user list
whoami                   |-show the login user name
usermod -g group user |-change user's main group
usermod -G group user |-change user's group
chown user file      |-change the own of a file or dictory
 chgrp -R group file |-change the group for a file 
chmod -R 755 file 
install   a software ,just release it;uninstall need to delete its' release files,and hoom/xxx file,and /usr/share/applications/xxxx


猜你喜欢

转载自blog.csdn.net/qq_14942375/article/details/80432914