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
Newer Post
Older Post
Home
View mobile version
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment