The philosophical thinking of LINUX: all documents;
Normal file
Catalog files
Link file
Device files
Pipeline files
Directory:
/file system's upper root directory
/bin Store user-Frequently used commands, such as Ls,cat
The files that are required when the/boot operating system starts
/dev Interface device files such as/DEV/SDA represent the first physical SATA interface hard disk
/etc to store the configuration files and subdirectories required for system management
Home Directory for general users
File system mount points for/media devices
/proc is a virtual directory, is the system memory mapping, can obtain system information
/root Root User's home directory
/sbin the program to be executed when the system is started
/tmp deposit some temporary files
/USR Stores system commands and application information used by the user
/lib Storage System The most basic dynamic link sharing library
/lost+found usually empty, when not properly shut down, here to store the recovered files
var store variable nature of the relevant program directory
mkdir: New Directory
MkDir Linux represents the creation in the current directory
[[email protected] ~]# mkdir Linux
[[email protected] ~]# ls
Anaconda-ks.cfg install.log install.log.syslog linux test.txt public template video picture document download music Desktop
Mkdir/linux: Indicates the creation of a Linux directory under the root directory
[Email protected] ~]# Mkdir/linux
[[Email protected] ~]# CD/
[[email protected]/]# ls
Bin boot Cgroup Dev etc home lib Linux lost+found media misc mnt mydata net opt proc root sbin selinux Squid SRV sys tmp usr var
[[email protected]/]# rmdir Linux Delete directory
[[email protected] ~]# ls
Anaconda-ks.cfg install.log install.log.syslog linux test.txt public template video picture document download music Desktop
[Email protected] ~]# RM test.txt
RM: Do you want to delete the normal file "Test.txt"? Y Delete Files
RM-RF: Indicates that the directory is forcibly deleted and the files in it
[[email protected] ~]# rm-rf/linux This command is dangerous, use with caution!
[Email protected] ~]# mkdir test
[Email protected] ~]# mkdir test1
[[Email protected] ~]# CD test
[[email protected] test]# Touch file
[Email protected] ~]# ln-s/test/file test1/file.ln
[Email protected] ~]# CD test1
[[email protected] test1]# ls
File.ln creating a linked file
CD: Switch directories
[Email protected] test1]# Cd/home
[Email protected] home]# CD. Toggle Upper Directory
[Email protected]/]#
PWD: Displays the current directory
[Email protected]/]# pwd
/
ls: Listing directory contents
[[email protected]/]# ls
Bin boot Cgroup Dev etc home lib Lost+found media misc mnt mydata net opt proc root sbin selinux squid SRV sys tmp usr var
[Email protected]/]# ls-a
. .. . autofsck. Autorelabel bin boot cgroup. Dbus Dev etc home lib Lost+found media misc mnt MyData net opt pr OC root sbin selinux squid srv sys tmp usr var
[Email protected]/]# ls-a
. autofsck. Autorelabel bin boot cgroup. Dbus Dev etc home lib Lost+found media misc mnt MyData net opt pr OC root sbin selinux squid srv sys tmp usr var
[Email protected]/]# ls-l
Total Dosage 112
Dr-xr-xr-x. 2 root root 4096 September 20:06 bin
Dr-xr-xr-x. 4 root root 4096 September 17:13 boot
Drwxr-xr-x. Root root 4096 September 21:02 Cgroup
Drwxr-xr-x root root 3860 September 09:51 Dev
Drwxr-xr-x. 153 root root 12288 September 09:51 etc
Drwxr-xr-x. 6 root root 4096 September 17:49 Home
......
[Email protected]/]#
[[email protected] home]# ls-r recursively displays list of all files and subdirectories in the directory
.:
Dingning dn123456 Lost+found Nginx
./dingning:
./dn123456:
Public template video Picture document download music Desktop
./dn123456/Public:
./dn123456/Templates:
./dn123456/Video:
[[email protected] test]# Touch Lily Create a new empty file
[[email protected] test]# ls
File Lily
Cat: View File contents
[[email protected] test]# cat file View:
This is linux!
[[email protected] test]# Cat/root/test/file Absolute Path
This is linux!
[[email protected] ~]# cat >/home/love.txt Create a file with cat, the last line must press ENTER, CTRL + C end
I Love liujiayao!
^c
[Email protected] ~]# Cat/home/love.txt
I Love liujiayao!
[[email protected] ~]# Cat-b/home/love.txt Add number
1I Love liujiayao!
2God bless you!
[[email protected] nginx]# less/etc/nginx/nginx.conf Interactive operation
[[email protected] nginx]# more/etc/nginx/nginx.conf page display content
# For more information on configuration, see:
# * Official 中文版 documentation:http://nginx.org/en/docs/
# * Official Russian documentation:http://nginx.org/ru/docs/
User Nginx;
Worker_processes 1;
Error_log/var/log/nginx/error.log;
#error_log/var/log/nginx/error.log Notice;
#error_log/var/log/nginx/error.log Info;
Pid/run/nginx.pid;
Events {
Worker_connections 1024;
}
HTTP {
Include/etc/nginx/mime.types;
Default_type Application/octet-stream;
Log_format Main ' $remote _addr-$remote _user [$time _local] "$request" '
' $status $body _bytes_sent ' $http _referer '
' "$http _user_agent" "$http _x_forwarded_for";
Access_log/var/log/nginx/access.log main;
Sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
Keepalive_timeout 65;
#gzip on;
Index index.html index.htm;
# Load Modular configuration files from THE/ETC/NGINX/CONF.D directory.
# See Http://nginx.org/en/docs/ngx_core_module.html#include
# for more information.
include/etc/nginx/conf.d/*.conf;
[[email protected] ~]# More +3/etc/nginx/nginx.conf start the page with the third line
[[email protected] ~]# more +/error/etc/nginx/nginx.conf The first error string appears in the file and later
Linux file Management