IBM Support

IBM AIX: 'ls -la' Not Displaying Full Group/User Names

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

[{"Type":"MASTER","Line of Business":{"code":"LOB08","label":"Cognitive Systems"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG10","label":"AIX"},"ARM Category":[{"code":"a8m0z000000cvzgAAA","label":"Commands"}],"ARM Case Number":"TS007391944","Platform":[{"code":"PF002","label":"AIX"}],"Version":"All Versions"}]

Document Information

Modified date:
12 November 2021

UID

ibm16515504