mac-command-line-doing

Create folder

mkdir myDirectory

create a new file

touch a.html

edit file

vim a.html

Delete Files

rm a.html

delete entire folder

rm -rf myDirectory

Copy the file (a.html) to the specified folder (myDirectory)

cp a.html myDirectory

Move the file (a.html) to the specified folder (myDirectory)

mv a.html myDirectory

Move the file (a.html) to the specified folder (myDirectory) and rename it

mv a.html myDirectory/b.html

View all files in a folder (myDirectory)

ll myDirectory (can be omitted)

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325262420&siteId=291194637