Command line list

커멘드 라인 리스트

Change Directory

cd

Example:

cd "path/to/directory/"

Listing Directory

ls

Example:

ls "path/to/directory/"

Open files

open

Example:

open "filename"

Copy a file to another directory

cp

Example:

cp "filename" "newfilename"

Move a file

mv

Example:

mv "filename" "path/to/new/file/location"

Create a text file

touch

Example:

touch myfile.txt (Figure F)

Create a directory

mkdir

Example:

mkdir "path/to/new/directory"

Remove an empty directory

rmdir

Example:

rmdir "path/to/directory"

Remove nested directories

rm -R

Example:

rm -R "/path/to/root/directory"

Execute commands with superuser privileges

sudo

Example:

sudo "command"

List actively running computer processes

top

Example:

top

Quit sub-screen and return to Terminal

q

Example:

After executing a command, such as top to view active processes, press "q" to exit.

Clear the Terminal screen of all previous commands

clear

Example:

clear

Copy contents of a folder to a new folder

ditto

Example:

ditto -V MyFolder MyNewFolder

Get one-line description for a command

whatis

Example:

whatis "command"

Show manual page for a command

man

Example:

man "command"

The “exit” command

exit

Example:

exit

Resource