unix
Monday, March 20, 2017
FIND Command - File Deletion with exclusion specific extension
# cat non_csv_delete.sh
#!/bin/bash
for user in $(cat /sftp_users.txt)
do find /home/$user/ -type f ! -name "*.csv*" -a -type f ! -name "*.CSV*" -delete
done
No comments:
Post a Comment
‹
›
Home
View web version
No comments:
Post a Comment