查看磁盘剩余空间

# df -hl
分区/总大小/已使用空间/剩余空间/使用率/挂载路径
Filesystem      Size  Used Avail Use% Mounted on
/dev/vda1        40G  9.2G   29G  25% /
devtmpfs        1.9G     0  1.9G   0% /dev
tmpfs           1.9G     0  1.9G   0% /dev/shm
tmpfs           1.9G  340K  1.9G   1% /run
tmpfs           1.9G     0  1.9G   0% /sys/fs/cgroup
/dev/vdb        197G  114G   75G  61% /home/wwwroot
tmpfs           380M     0  380M   0% /run/user/0

查找指定名称的文件

# find /data/www/ -name "27.log"
/data/www/bc3.bocaidj.com/runtime/log/201908/27.log
/data/www/bc3.bocaidj.com/runtime/log/201907/27.log
/data/www/bc2.bocaidj.com/_v507_runtime/log/201808/27.log
/data/www/bc2.bocaidj.com/_v507_runtime/log/201811/27.log
/data/www/bc2.bocaidj.com/_v507_runtime/log/201908/27.log
/data/www/bc2.bocaidj.com/_v507_runtime/log/201907/27.log
/data/www/bc2.bocaidj.com/_v507_runtime/log/201810/27.log

查找指定名称指定内容的文件

find /data/www/ -name "*.php" | xargs grep "game_categorys"
/data/www/application/api/controller/app/Guess.php:        $this->addData('game_categorys', $games);
/data/www/application/api/controller/system/Cache.php:        $this->addData('game_categorys', $games);

显示文件列表

显示隐藏文件

# ls -la
total 108
drwxr-xr-x 12 www-data www-data  4096 Jul  5 10:35 .
drwxr-xr-x  7 www-data www-data  4096 Jul  7 01:48 ..
drwxr-xr-x 14 www-data www-data  4096 Jul  5 10:31 application
-rwxr-xr-x  1 www-data www-data  1070 Jul  5 10:31 build.php
-rw-r--r--  1 www-data www-data   950 Jul  5 10:31 composer.json
-rw-r--r--  1 www-data www-data 37760 Jul  5 10:31 composer.lock
drwxr-xr-x  2 www-data www-data  4096 Jul  6 03:25 config
drwxr-xr-x  4 www-data www-data  4096 Jul  5 10:31 database
drwxr-xr-x  5 www-data www-data  4096 Jul  5 10:31 extend
-rwxr-xr-x  1 www-data www-data  1822 Jul  5 10:31 LICENSE.txt
drwxr-xr-x  2 www-data www-data  4096 Jul  5 15:50 lock
drwxr-xr-x  5 www-data www-data  4096 Jul  5 10:38 public
-rwxr-xr-x  1 www-data www-data  6356 Jul  5 10:31 README.md
drwxr-xr-x  2 www-data www-data  4096 Jul  5 10:31 route
drwxr-xr-x  7 www-data www-data  4096 Jul  5 15:41 runtime
drwxr-xr-x  5 www-data www-data  4096 Jul  5 10:31 thinkphp
drwxr-xr-x 20 www-data www-data  4096 Jul  5 10:31 vendor

标签: none

添加新评论