## 基本操作
cd / pwd / ls
```
cd /etc/sysconfig/network-scripts
pwd
ls -al
cd ~/
pwd
```
mkdir / cp / mv
```
mkdir -p /backup/20190816
cp -ar /data/ /backup/20190816
mkdir /backup/archive
mv /backup/20190816 /backup/archive
# mv可以修改文件名称
mv file file_new_name
```
chmod / chown
```
chmod -R 775 folder01
find top_folder -type d -exec chmod 755 {} \;
find top_folder -type f -exec chmod 644 {} \;
chmod u+x auto.sh
chown -Rh user01:user01 folder01
```
## 查找文件
find
```
find /etc -name "*tab"
```
ln
```
yum install httpd -y
find /etc -name "httpd.conf"
/etc/httpd/conf/httpd.conf
ln /etc/httpd/conf/httpd.conf httpd.conf.hard_link
ln -s /etc/httpd/conf/httpd.conf httpd.conf.symbolic_link
ls -li httpd*
67192423 -rw-r--r--. 2 root root 11753 Jul 29 23:15 httpd.conf.hard_link
100663400 lrwxrwxrwx. 1 root root 26 Aug 19 18:30 httpd.conf.symbolic_link -> /etc/httpd/conf/httpd.conf
```
find -inum
```
find / -inum "67192423"
/etc/httpd/conf/httpd.conf
/root/httpd.conf.hard_link
```
lsof
```
# 查找哪里打开file01
lsof | grep file01
```