Common command operation skills of Linux file processing

Time:2020-1-8

I’m a Linux beginner. Take a note. Here are some common Linux file processing commands:

command prompt

[[email protected]~]#

Among them:

Root indicates the current login user

Localhost stands for host name

~Indicates the current directory (home directory)

#Prompt for super user name

The normal user’s prompt is$

Content in query Directory: LS

Ls [options] [file or directory]

Options are:

-A show all files, including hidden files

-L. display details

-D view directory properties

-H humanized display file size

-I display incode

New directory: MKDIR

MKDIR – P [directory name]

-P recursive creation

Make directions

Switch Directory: CD

CD [directory]

Change directory

Simplified operation

Cd ~ (or just enter CD) into the home directory of the current directory

CD – go to last directory

CD.. go to the previous directory

CD. Enter the current directory

Query directory location: PWD

pwd

Print working directory

Delete empty directory: rmdir

Rmdir [directory name]

Remove empty directory

Delete file or directory: RM

RM – RF [file or directory]

Remove: remove

Options:

-R delete directory

-F force deletion

Copy command: CP

CP [options] [original file or directory] [destination directory]

Options:

-R copy directory

-P copy with file attributes

-D if the source file is a linked file, copy the link properties

-A is equivalent to – PDR

Cut or rename: MV

MV [source file or directory] [target directory]

Rename if the target directory is the current directory, otherwise cut

summary

The above is the common command operation skills for Linux file processing introduced by Xiaobian. I hope it can help you. If you have any questions, please leave a message to me, and Xiaobian will reply you in time. Thank you very much for your support of the developepaer website!