[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#36220: ls -l: maddening mixed left right justifications with numeric
From: |
Dan Jacobson |
Subject: |
bug#36220: ls -l: maddening mixed left right justifications with numeric ids |
Date: |
Sat, 15 Jun 2019 10:35:10 +0800 |
Some files might only have numeric user ids,
# ls -l
-rw-r--r-- 1 777 root 0 06-15 10:14 a
-rw-r--r-- 1 root 777777 0 06-15 10:11 b
-rw-r--r-- 1 root root 0 06-15 10:12 c
-rw-r--r-- 1 root 777 0 06-15 10:12 d
Well it turns out an undocumented feature is that numeric ids are
justified in the opposite direction of regular ids.
Makes sense, however it wreaks havoc in the above mixed situations.
The only way to get columns to line up in such mixed situations is
# ls -ln
-rw-r--r-- 1 777 0 0 06-15 10:14 a
-rw-r--r-- 1 0 777777 0 06-15 10:11 b
-rw-r--r-- 1 0 0 0 06-15 10:12 c
-rw-r--r-- 1 0 777 0 06-15 10:12 d
but that sacrifices the names.
Well at least on (info "(coreutils) What information is listed") at
‘-n’
‘--numeric-uid-gid’
Produce long format directory listings, but display numeric user
and group IDs instead of the owner and group names.
document that "Note that numeric ids are always right justified."
ls (GNU coreutils) 8.30