特定のディレクトリ内のファイルが必要で、次のスクリプトを使用します。
echo "give name of directory: "
read directory
if [ -d "$directory" ]
then
echo "thanks again"
else exit
fi
find /-type f $directory
残念ながら、これは機能しません。
ベストアンサー1
find $directory -type f
サブディレクトリを含む、そのディレクトリ内のすべてのファイルを検索します。