深度阅读

How do I display the group name of each file using the ls command in Linux?

作者
作者
2023年08月22日
更新时间
6.34 分钟
阅读时间
0
阅读量

To display the group name of each file using the ls command in Linux, you can use the -g option. The -l option is also commonly used with -g to display detailed information about each file, including its permissions, owner, group, size, and modification time. Here is an example command:

ls -l -g

This will list all the files in the current directory along with their group names. If you only want to display the group name and not the other details, you can use the -o option along with -g, like this:

ls -g -o

This will give you a more concise output that only shows the group name and file name.

相关标签

博客作者

热爱技术,乐于分享,持续学习。专注于Web开发、系统架构设计和人工智能领域。