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
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
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
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
RM-Delete Files
RM command to delete files. Use this command with caution-RM does not ask you to confirm it.
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
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
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
mkdir-New Catalog
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
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.
touch-Creating an empty file
Touch command to create an empty file
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.
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