Rookie Learn Linux command: CD RM MV CP PWD Directory operation

Source: Internet
Author: User

file and directory operations must be mastered. pwd Command

The PWD command is used to print the current directory.

CD Command

The most basic operation of Linux.

Command format
CD [directory name] Toggle current directory to DirName

parameter rule
1. Return to the previous level of the directory
CD:
2. Return to system root
CD/
3. Enter the current user home directory

direct use of CD
or CD ~
Span style= "FONT-SIZE:16PX;" >4. Jump to the specified directory

cd/data/jdk7/
subdirectories in the current directory write names directly
cd Music
5. Return to the directory in which you came before this directory
CD-
Span style= "FONT-SIZE:16PX;" >6. Use the parameters of the previous command as CD parameters.
cd!$


RM Command

Deleting one or more files or directories in a directory can also delete a directory and all of its files and subdirectories. For linked files, only the links are deleted and the original files remain unchanged.

Parameter rules

1. Deleting directories and files

RM-RF Directory

-R is recursive down, no matter how many levels of directory, delete
-F is directly forcibly deleted, without any hint of meaning

2. Delete directory can use RmDir, but can only delete empty folders

MV Command

The MV command is an abbreviation of move, which can be used to move files or rename files, and is a common command used in Linux systems, often to back up files or directories.

CP Command

The CP instruction is used to copy a file or directory, such as specifying more than two files or directories at the same time, and the final destination is an existing directory, it will copy all the previously specified files or directories into this directory.

Rookie Learn Linux command: CD RM MV CP PWD Directory operation

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.