ls命令输出格式算法_ls命令

ls命令输出格式算法

Inside a folder you can list all the files that the folder contains using the ls command:

在文件夹内,您可以使用ls命令列出该文件夹包含的所有文件:

ls

If you add a folder name or path, it will print that folder contents:

如果添加文件夹名称或路径,它将打印该文件夹内容:

ls /bin

ls accepts a lot of options. One of my favorite options combinations is -al. Try it:

ls接受很多选择。 我最喜欢的选项组合之一是-al 。 试试吧:

ls -al /bin

compared to the plain ls, this returns much more information.

与普通的ls相比,它返回​​的信息更多。

You have, from left to right:

您具有从左到右的位置:

  • the file permissions (and if your system supports ACLs, you get an ACL flag as well)

    文件权限(如果系统支持ACL,则也会获得ACL标志)
  • the number of links to that file

    指向该文件的链接数
  • the owner of the file

    文件的所有者
  • the group of the file

    文件组
  • the file size in bytes

    文件大小(以字节为单位)
  • the file modified datetime

    文件修改的日期时间
  • the file name

    文件名

This set of data is generated by the l option. The a option instead also shows the hidden files.

这组数据由l选项生成。 相反, a选项还会显示隐藏的文件。

Hidden files are files that start with a dot (.).

隐藏文件是指以点( . )开头的文件。

This command works on Linux, macOS, WSL, and anywhere you have a UNIX environment

此命令可在Linux,macOS,WSL以及您拥有UNIX环境的任何地方使用

翻译自: https://flaviocopes.com/unix-command-ls/

ls命令输出格式算法

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值