ls:列出目录内容(默认的就是当前工作目录了)
格式:命令 [选项] [参数]
选项:
-a:列出所有文件、目录(包含隐藏文件、目录)
-l:以长格式的方式列出
-d:仅列出目录本身
-h:配合-l选项使用,以友好的方式,显示文件的大小(若不加-h,默认文件大小是以byte来显示);
实例:
[root@uni test]# ls
dir file file1
[root@uni test]# ls -l
总用量 10248
drwxr-xr-x 2 root root 4096 7月 16 15:30 dir
-rw-r--r-- 1 root root 7 7月 16 15:30 file
-rw-r--r-- 1 root root 10485760 7月 16 15:32 file1
[root@uni test]# ls -lh
总用量 11M
drwxr-xr-x 2 root root 4.0K 7月 16 15:30 dir
-rw-r--r-- 1 root root 7 7月 16 15:30 file
-rw-r--r-- 1 root root 10M 7月 16 15:32 file1
[root@uni test]# ls -alh
总用量 11M
drwxr-xr-x 3 root root 4.0K 7月 16 15:32 .
drwxr-xr-x. 3 root root 4.0K 7月 16 14:04 ..
drwxr-xr-x 2 root root 4.0K 7月 16 15:30 dir
-rw-r--r-- 1 root root 7 7月 16 15:30 file
-rw-r--r-- 1 root root 10M 7月 16 15:32 file1
[root@uni test]# ls -ldh
drwxr-xr-x 3 root root 4.0K 7月 16 15:32 .
以上就是LINUX系统下简单操作--查看文件、目录属性的详细内容,更多请关注php中文网其它相关文章!
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号