Linux Operations
origin url(https://ubuntu.com/tutorials/command-line-for-beginners#4-creating-folders-and-files)
File operators
open a terminal
_ shift+alt+t _
show current working directory
_ pwd _
change directory
- cd *
- change directory to root _ cd / _
- change directory to absolute path _ cd abPath _
- change directory to relative path _ cd rePath _
creating floder
- mkdir dirname *
- create multiple folder _ mkdir name1 name2 name3 _
- create parent folder too _ mkdir -p/--parent name1/name2/... _
- create a flie named with " " - use "" to embed name or use escape haractor ‘\’
show file names in a folder
_ ls _
redirection charactors
-
:redirection with refresh
-
:redirection without refresh
ls > output.txt - <
look the content in a file
cat output1.txt
- show multiple files : cat file1 file2 file3
show the argument on the screen
echo ".."
quick mark
- ?:any single character
- *:zero or more characters
show file contents with the form of paper
less/more filename
Moving and manipulating files
move file to another directory
mv filename directory
标签:show,基础,cd,file,linux,directory,操作,folder,change From: https://www.cnblogs.com/forCC/p/18395979