How To
Summary
For groups and users with names longer than 8 characters, 'ls -la' truncates the names down to 8 characters.
Steps
The 'ls' command, by design, truncates user names and group names to 8 characters unless the -X flag is specified.
For example, a user with a name longer than 8 characters, 'testuserwithaverylongname', and a group, 'testgroupwithaverylongname', with assigned ownership to a file called 'testfile11'. 'ls -la' will display:
# ls -la testfile11
-rw-r--r-- 1 testuser testgrou 0 Nov 04 11:25 testfile11
And we see that both the user name and the group name are truncated down to 8 characters.
But when 'ls -la' is run with the '-X' flag, the full names will be displayed:
# ls -lXa testfile11
-rw-r--r-- 1 testuserwithaverylongname testgroupwithaverylongname 0 Nov 04 11:25 testfile11
In conclusion, in order to view user and group names longer than 8 characters, 'ls' needs to be run with the '-X' flag.
Document Location
Worldwide
Was this topic helpful?
Document Information
Modified date:
12 November 2021
UID
ibm16515504