|
[[email protected] test]# ls–a # Show all, including hidden files
. .. Dir1 dir2 dir3 file1 file2 file3
[[email protected] test]# ls-l/ll # long format display
Total 12
Drwxr-xr-x 2 root root 4096 Mar 14:23 Dir1
Drwxr-xr-x 2 root root 4096 Mar 14:23 Dir2
[[email protected] test]# ll–h # Show file size in K,M,G
Total 12K
Drwxr-xr-x 2 root root 4.0K Mar 14:23 dir1
Drwxr-xr-x 2 root root 4.0K Mar 14:23 Dir2
[[email protected] test]# touch-m file1-d "20180311" # Modify Change Time
[[email protected] test]# touch-m file2-d "20180312" # Modify Change Time
[[email protected] test]# ll–t # According to the modified time to sort, from near to far, by default is modified by the time
Total 0
-rw-r--r--1 root root 0 Mar 00:00 file2
-rw-r--r--1 root root 0 Mar 00:00 file1
[[email protected] test]# ll–tr #-r reverse, usually with a- t use
Total 0
-rw-r--r--1 root root 0 Mar 00:00 file1
-rw-r--r--1 root root 0 Mar 00:00 file2
[[email protected] test]# ll-d/test/ # Show only the properties of the current file or directory
Drwxr-xr-x 6 root root 4096 Mar 14:42/test/
[[email protected] test]# touch-a file2-d "20180313" # Modify Access Time
[[email protected] test]# touch-a file1-d "20180314" # Modify Access Time
[[email protected] test]# LL-TC # sorted by file access time
Total 0
-rw-r--r--1 root root 0 Mar 14:47 file1
-rw-r--r--1 root root 0 Mar 14:47 file2
[email protected] test]# stat file2 View Status
File: ' File2 '
size:0 blocks:0 IO block:4096 Regular empty file
device:fd00h/64768d inode:521236 links:1
Access: (0644/-rw-r--r--) Uid: (0/root) Gid: (0/root)
ACCESS:2018-03-13 00:00:00.000000000-0400
Modify:2018-03-12 00:00:00.000000000-0400
Change:2018-03-19 14:47:13.681005838-0400
[Email protected] test]# stat file1
File: ' File1 '
size:0 blocks:0 IO block:4096 Regular empty file
device:fd00h/64768d inode:521234 links:1
Access: (0644/-rw-r--r--) Uid: (0/root) Gid: (0/root)
Access:2018-03-14 00:00:00.000000000-0400
Modify:2018-03-11 00:00:00.000000000-0500
Change:2018-03-19 14:47:19.547994463-0400
|