ASCCON / DStat

Quickly gather and print directory statistics.
MIT License
1 stars 0 forks source link

Weirdness with flag order #48

Closed ASCCON closed 5 months ago

ASCCON commented 6 months ago

e.g:

[ wgd@LIGETI Lo 65F947AF Git github.com:ASCCON DStat://DStat "main" ]
$ ./dstat 
Directory:
    /Users/wgd/code/ASCCON/DStat

Totals:
       4:directories
       0:FIFO files
       0:character special files
       0:block special files
       7:regular files
       0:symlinks
       0:sockets
       0:union whiteout files
       0:unknown file types
[ wgd@LIGETI Lo 65F9483C Git github.com:ASCCON DStat://DStat "main" ]
$ ./dstat /usr -C /tmp -L
Directories:
    /tmp
    /usr
+---------+---------+---------+---------+---------+---------+---------+---------+---------+
| Regular |     Dir |    Link |   Block |    Char |    FIFO |  Socket |  WhtOut | Unknown |
+---------+---------+---------+---------+---------+---------+---------+---------+---------+
|       0 |       3 |       0 |       0 |       0 |       0 |       1 |       0 |       0 |
|       0 |      11 |       2 |       0 |       0 |       0 |       1 |       0 |       0 |
+---------+---------+---------+---------+---------+---------+---------+---------+---------+
[ wgd@LIGETI Lo 65F94841 Git github.com:ASCCON DStat://DStat "main" ]
$ ./dstat /usr -c /tmp   
Directories
/tmp
/usr
Regular,Directory,Link,Block Special,Character Special,FIFO,Socket,White Out,Unknown 
0,11,2,0,0,0,1,0,0 
[ wgd@LIGETI Lo 65F948FA Git github.com:ASCCON DStat://DStat "main" ]
$ ./dstat /usr -c /tmp -L
Directories:
    /tmp
    /usr

Totals:
      11:directories
       0:FIFO files
       0:character special files
       0:block special files
       0:regular files
       2:symlinks
       1:socket
       0:union whiteout files
       0:unknown file types
[ wgd@LIGETI Lo 65F9490F Git github.com:ASCCON DStat://DStat "main" ]
$ ./dstat -L /usr -c /tmp
Directories:
    /tmp
    /usr

Totals:
      11:directories
       0:FIFO files
       0:character special files
       0:block special files
       0:regular files
       2:symlinks
       1:socket
       0:union whiteout files
       0:unknown file types
[ wgd@LIGETI Lo 65F94914 Git github.com:ASCCON DStat://DStat "main" ]
$ ./dstat -L /usr /tmp   
Directories:
    /tmp
    /usr
+---------+---------+---------+---------+---------+---------+---------+---------+---------+
| Regular |     Dir |    Link |   Block |    Char |    FIFO |  Socket |  WhtOut | Unknown |
+---------+---------+---------+---------+---------+---------+---------+---------+---------+
|       0 |      11 |       2 |       0 |       0 |       0 |       1 |       0 |       0 |
+---------+---------+---------+---------+---------+---------+---------+---------+---------+
[ wgd@LIGETI Lo 65F9491E Git github.com:ASCCON DStat://DStat "main" ]
$ 
ASCCON commented 6 months ago

Hint: The last three should look like the last one.