and*_*.vh 4 linux command-line scripting find
我需要一个脚本来查看目录中的文件并查看它是否存在于多个目录之一中。
我需要这样的东西:
for files in /downloads/ #may or may not be in a sub-directory
do
print if file exists in /media/tv, /media/movie, or /media/music
done
Run Code Online (Sandbox Code Playgroud)
这些文件不会在目录的根目录中。我不能只搜索 /media,因为我不想在 cd-rom 或视频中搜索。
我正在使用最新版本的 Ubuntu 服务器。