Linux Learning Note 1. Common commands
Commands are stored, which commands can be executed?
|
Root |
/sbin
/usr/sbin |
|
All Users:
|
/bin
/usr/bin |
|
bin--binary Binary Files
Linux all of them are files, binary files
Usr-user
Sbin-super binary |
|
File processing commands |
|
|
1 |
Ls |
The English original is the list function: Display directory file attributes can be attached to write, such as Ls-ld |
Eg |
Meaning |
|
-A All |
Show all files, including hidden files |
LS-A/ |
|
|
-L Long |
Detailed information display |
[[email protected] ~]# ls-l
Total 14
-rw-------1 root root 1211 04:02 ANACONDA-KS.CFG
Drwxr-xr-x 3 root root 4096 Feb 11:20 Desktop
-rw-r--r--1 Root Root 31736 Feb 04:02 install.log
-rw-r--r--1 root root 0 Feb 03:16 INS Tall.log.syslog
Drwxr-xr-x 2 root root 4096 Feb 17:36 test |
Drwxr-xr-x 2 root root 4096 11:20
Every three permissions represents the number of hard connections owner Owning group file size creation time
Data block block 512 byte
The first character is indicated as follows:
d Directory directory
- binaries
l soft link files
Each of the three assignments is as follows:
R Read reading w-write write X-execute execute
rwx r-x r-x
Owner u belongs to group g other people o
user group others |
|
-D |
View Directory Properties |
[Email protected] ~]# ls-ld/test
Drwxr-xr-x 3 root root 4096 Feb 17:42/test |
|
|
2 |
Cd |
Switch directories |
|
|
|
Cd/ |
Go to the root directory |
|
|
|
Cd [Catalogue] |
|
|
|
|
Cd.. |
Return to Parent Directory |
|
|
|
3 |
Pwd |
English: Print working directory |
View current directory |
[Email protected] ~]# pwd
/root |
|
|
4 |
Touch |
Create an empty file |
|
[email protected] test]# Touch testfile
[Email protected] test]# ls-l testfile
-rw-r--r--1 root root 0 Feb 18:51 testfile |
|
|
5 |
Mkdir |
English: Make directories |
Create an empty directory |
[Email protected] ~]# mkdir test |
|
|
6 |
Cp |
English: Copy |
Copy a file or directory |
copy–r [source file or source directory] [destination directory] |
|
|
|
|
|
|
|
|
Linux Learning Notes