最佳答案
如果使用 for 循环迭代目录,那么如何只回显文件的文件名?
for filename in /home/user/*
do
echo $filename
done;
will pull the full path with the file name. I just want the file name.