Linux命令"ls"进阶说明

  • pwdthe current working directory

  • cd -: return to the previous working directory

  • Filenames that begin with a period character are hidden. 使用ls不会显示 这些文件,必须使用ls -a

  • By adding -l to the commandls -l, we changed the output to the long format.

  • ls -lt 列出文件详细信息,并根据修改时间排序。使用ls -lt --revers会反向排序

  • ls -F,如果是文件夹会显示为:Downloads/,在结尾用符号"/"加以区别

  • ls -lh,文件大小以KB为单位显示,便于阅读

  • ls -lhS,按照文件大小排序,大小以KB为单位显示

原文地址:https://www.cnblogs.com/yaos/p/6940314.html