Sample command:
./delete.sh /path/to
|-Path
|- to
|- file1
|- file2
|-location
|- file3
|- file4
|- file5
.
.
|- fileN
Need to delete all the files(file1,file2,file3.....fileN) inside to and location directory using script but do not want to delete to and location directory, need to delete only files in that directory.
In delete.sh
you should remove the files inside the directory
d="$1"
rm -rf $d/*
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.