File and directory operation commands for Linux common commands

Source: Internet
Author: User

The following are common file and directory operations commands for Linux operating systems:

Cd/home Enter '/home ' directory '  CD. Return to the previous level of directory  CD: /.. Return to the top level two directory  CD enter the personal home directory  CD ~user1 into the personal home directory  CD-return to the last directory  pwd show work path  ls view files in directory  ls-f View files in a directory  ls-l display file and directory details  ls-a show hidden files  ls *[0-9]* display filenames and directory names containing numbers  tree display files and directories starting with the root directory tree (1)  lstree displaying files and directories starting with the root directory tree (2)  mkdir Dir1 Create a directory called ' Dir1 '  mkdir dir1 dir2 Create two directories at the same time  mkdir-p/tmp/ DIR1/DIR2 Create a directory tree  rm-f file1 Delete a file called ' file1 '  rmdir dir1 Delete a directory called ' Dir1 '  rm-rf dir1 delete a name called ' Dir1 ' Directory and delete its contents simultaneously  rm-rf Dir1 DIR2 Delete two directories and their contents  MV dir1 new_dir rename/move a directory  CP file1 file2 copy a file  CP dir/* . Copy all files under a directory to the current working directory  cp-a/tmp/dir1. Copy a directory to the current working directory  cp-a dir1 dir2 copy a directory  ln-s file1 lnk1 Create a soft link to a file or directory  ln file1 lnk1 Create a physical link to a file or directory   Touch-t 0712250000 File1 Modify the timestamp of a file or directory-(YYMMDDHHMM)  file file1 outputs the MIME type of the file as Text icon V-l List of known encodings

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.