Software testing basic learning -linux

Linux Basics

/ (Root folder) into root and home /

1.cd command

cd ~ home folder (a folder in Home)

cd .. back to the parent folder

cd / home / start absolute path from the root folder

cd admin-a relative path

cd - look back at the function

pwd absolute path to the current folder

Command to view the folder directory 2.ls command 

Ls directory folder view

ls -a view all of the folder directory

ls -l directory folder view details

ls -lh view details directory folder (become more human words)

ls -l  === ll   

ll -ha view details about all directory folders (become more human words)

ll * txt view txt file end has

3.mkdir create directory command

mkdir a b create two folders in the current directory

mkdir / home / admin / fung / 666 888 -p create a folder in the absolute path, even if the parent directory does not exist, will be created automatically on the first level directory

mkdir / home / admin / fung / 666 / {888,168} in an absolute path, create two folders

mkdir .688 creates a hidden file

4.rm command to delete a file or folder

rm file name or hidden files 

rm -r folder name

rm -r *

5.touch create a txt file command

touch 1.txt created in the current directory

gedit 1.txt open manner with Notepad

6. express permission

d rwx rwx -x d represents the first letter of the folder - on behalf of txt file  

Permissions Permissions Only -x execute r read access w write permission x execute

The first rwx represents the permissions the user's permission on behalf of the second user group permissions of other users of the Three Represents

7.cp command to copy files

cp source file new general txt file types

cp -r source file new file folder types

8.mv mobile command

mv 1.txt 2.txt the name was changed to the name of 1 of 2

Music Videos folder 1 2 1 Folder folder to move into the folder 2

9.> Redirect command

ls> Results txt file copied to the output of the ls command txt file, before the data will overwrite

ls >> txt file output of the ls command to copy the results to txt file, it does not overwrite data before

10.cat View Folder command

cat 1.txt the contents of a folder displayed on the screen

cat 1.txt 2.txt> 3.txt 1.txt and copy the contents to 2.txt 3 folder, and the folder view

11.more Page View command

more 1.txt spacebar to turn the page, press b to turn back, q is quit

12. | Pipe command

ls la | more to the left of the command completed results to the right of the command processing

 

Guess you like

Origin www.cnblogs.com/1617-fung/p/11370370.html