1. Commands for managing files and directories:
(1) Pwd:print working directory (print working directory), when entering PWD, requires the Linux system to display the current location.
(2) CD command: The CD command is used to change the directory in which it is located. Always return to the current home directory. If you need to convert to a different directory, you need a path name. [The difference between an absolute path and a relative path: if the first character of a path is/, then this path is the absolute path] CD. Tells the system to move up to the direct ancestor directory of the directory in which the current directory is located, or a CD if you want to move the level two directory up. /..
(3) LS command: Used to view the contents of the directory.
Ls-a is used to view all files in the directory, including hidden files.
LS-L lists the details of the contents of the directory, including permissions, owner, group, size, creation date,
Ls-s Sort by File size
(4) Cat command: Displays the contents of the entire file on the screen. If the file is longer, it will be rolled over quickly. To prevent this from happening, you can use Cat Filename.txt | Less command.
(5) grep command: The biggest function is to find a specific character in a bunch of files. For example, grep print Linux,grep is case-sensitive. The band (-i) is case insensitive, for example: Grep-i Print Linux. The option [-h] not only outputs this line, but also outputs the matching file name together.
(6) Touch command: Used to create a new file. Touch file name
(7) CP command: Used to copy files. CP source Target. You can also copy files to a directory below. CP Test.txt/home/user.
(8) MV command: Used to move files [mkdir new directory as folder, rmdir Delete directory]
(9) RM command: Used to delete files.