一、测试文件centos
[root@centos79 test]# touch a.txt b.txt [root@centos79 test]# ls a.txt b.txt
二、生成测试文件的绝对路径测试
[root@centos79 test]# ls a.txt b.txt [root@centos79 test]# ls *.txt | xargs -I {} echo "$PWD/{}" /home/test/a.txt /home/test/b.txt