1、
root@PC1:/home/test2# ls a.txt dir.1 test.csv test.ped root@PC1:/home/test2# ls -l total 8 -rw-r--r-- 1 root root 64 1月 21 23:14 a.txt drwxr-xr-x 2 root root 4096 1月 21 23:35 dir.1 -rw-r--r-- 1 root root 0 1月 21 23:35 test.csv -rw-r--r-- 1 root root 0 1月 21 23:35 test.ped root@PC1:/home/test2# ls -l | awk '{n=index($9,".")} {if($1!~/^[dt]/) print substr($9,1,n-1)}' ## 列出所有文件的前缀 a test test
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。