11 commands you need to know about managing files in Linux terminal

Source: Internet
Author: User
Tags touch command

  1. LS-List file

    The LS command lists the files in the directory. By default, LS is used to list the files in the current directory.

  2. 2

    You can also list file recursion-that is, list all files in the current directory-using Ls-r. LS can also list files in other directories, such as Ls/home will list all files under Home

  3. 3

    CD-Change Directory

    The CD command switches to another directory. For example, CD desktop will take you to your desktop directory if you start from your home directory.

  4. 4

    You can also specify a directory such as Cd/usr/share to enter the share directory under CD. Will take you back to the previous directory

  5. RM-Delete Files

    RM command to delete files. Use this command with caution-RM does not ask you to confirm it.

  6. Command rmdir-Delete directory

    rmdir command to delete empty directories. Command RmDir directory will delete the directory named directory in the current directory.

    If the directory is not empty, you can use the recursive RM command to delete all files in that directory.

    Rm-r directory will delete all files under directory

  7. MV-Moving files

    The MV command moves the file to the new location. This is also the command you will use to rename files, such as MV file NewFile, which will rename file to NewFile in this directory

  8. CP-Copy files

    The CP command works the same way as the MV command, except that it copies the original file separately, and you can make a recursive copy of Cp-r. Copy all the files in this directory to a new place.

    Cp-r/home/howtogeek/downloads/home/chris

  9. mkdir-New Catalog

  10. LN-Create a link

    The ln command creates the link. The most commonly used links may be symbolic links

    For example, the following command creates our download link in our Desktop folder:

    Ln-s/home/howtogeek/downloads/home/howtogeek/desktop

  11. chmod-Change Permissions

    chmod permissions to change files. For example chmod +x script.sh will add a file named Script.sh executable in the current folder, Chmod-x script.sh will remove executable permissions.

  12. touch-Creating an empty file

    Touch command to create an empty file

  13. MC-A complete File Manager

    Linux terminal full-featured File Manager, here is what you need to install it on Ubuntu by typing the following command: sudo apt-get install MC

    Once the installation is complete, simply run the MC command to start it.

  14. Use the arrow keys to select the File and tab key to toggle between panes. Press Alt-1 to see the help screen or press Alt-2 to see the menu.

Refer to the original link : https://jingyan.baidu.com/article/466506583d5a58f549e5f893.html

Blog is to remember that they are easy to forget things, but also a summary of their work, the article can be reproduced, without copyright. Hope to do their own efforts to do better, we work together to improve!

If there is any problem, welcome to discuss together, code if there is a problem, you are welcome to the great God!

11 commands you need to know about managing files in Linux terminal

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.