Count the simple commands that you will use in your work to strengthen your memory
- LS View the files under the current terminal directory
- Ls-a "Ls-a" will appear some file names with. xxxx, listing all content, including hidden files and directories
- LS-L lists all of the contents of the long-form directory, as follows. Space-sensitive
- Access rights. These are the operations allowed in a file or directory.
- The number of hard links. This number calculates the number of subdirectories and files. This number includes the parent directory link (
..
) and the current directory link ( .
).
- User name of the file owner
- The name of the group that owns the file
- The size, in bytes, of the file.
- Date and time when the file was last modified.
- The name of the file or directory.
- LS-T order files and directories before the last modification.
- Ls-alt This seed command can be put together output, such as '-alt ' will output A and L and t all
- PWD to see where the current terminal directory is located
- CD entry to a folder such as: CD index
- Use the following
- CD Index Enter the index folder below the current directory
- Cd.. .. is to forget to go up a layer of folders if you need to walk multiple please use something similar to this: /.. /
- Medir Create a folder such as: Medir Index2
- Touch creates a file such as: Touch Index.txt
- CP copy files to another folder such as: CP index/text.html html/Copy the text.html below the index directory into the HTML folder
- CP index/text.html index/text2.html html/If you want to copy multiple spaces separated by
- CP index/t*.html html/* (wildcard) stands for all meanings, this line copies all HTML files under the index directory that begin with T
- MV ' CP ' is a copy of the file, MV is the same way to transfer files, such as: MV index/text.html html/Transfer the text.html file in the index directory into HTML
- RM Delete files such as: RM index.html
- Rm-r Index RM is to delete a file that does not contain a folder, if you need to delete the folder input rm-r xxxx will delete all files in the folder
- echo input, such as: echo "Hello World"
- echo "Hello World" > Hello.txt Create a txt format text whose content is ' Hello World ', want to learn more about the keyword "redirect" You can Search
- Cat output content, such as: Cat Hello.txt
- Cat Hello.txt > world.txt the contents of hello inside the world.txt, output cat world.txt to view
- Cat Hello.txt >> world.txt Append the contents of hello to the back of World.txt
Some common command lines under Mac