Linux basic commands

Source: Internet
Author: User

LS lists the files and directories in the current directory (does not show hidden files)

-a lists all files and directories in the current directory

-l lists details of all files and directories in the current directory except hidden files (permissions, owner, owning group, file creation date and time)

-D use to view the properties of the specified directory for the directory (with the-l option)

CD Switch User directory (directory only)

PWD prints out the current directory

./Current Directory

.. /top level directory of the current directory

mkdir Creating a Directory

-m specify permissions for the created directory

-P Creating a cascading project (file)

RmDir Delete an empty directory (one or more can be separated by a space)-p delete the cascading directory

RM Delete files or directories

-r Delete directory equivalent to rmdir (can be deleted unless empty directory)

-F Force Delete (delete directory must add-r option)

Which finding the absolute path to a command

MV Move directory or file and rename mv [options] [source file] [target file]

-I security option (asking if the file is overwritten if it exists)

Note: (1) The destination file is a directory (exists and does not exist) if present, move the source file to the target file directory (included); The destination file is a file (equivalent to renaming) if it does not exist.

(2) If the destination file is not a directory and does not exist, the file will be renamed.

CP command copy CP [options] [source file] [destination file]

-r copy Directory (copy directory must add)

-I security option (asking if the file is overwritten if it exists)

Touch Modify file timestamp or create a new file that does not exist

Cat reads the contents of the file and prints it to the on-screen display


This article is from the "Exclusive View" blog, please be sure to keep this source http://mollu.blog.51cto.com/9742572/1878170

Linux basic commands

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.