lwfuk
asked on
How would I prune files that end in _batch_upload.csv?
Hi
I have a number of files in a directory called: /var/www/vhosts/test.com/h ttpdocs/re sults/
I would like to delete all of the files that end in: _batch_upload.csv
Here is an example of a real file: 3537732f540a1ac4298237f74c 0928f5_bat ch_upload. csv
How would I do it via the command line?
Kind Regards,
Adrian Smith
I have a number of files in a directory called: /var/www/vhosts/test.com/h
I would like to delete all of the files that end in: _batch_upload.csv
Here is an example of a real file: 3537732f540a1ac4298237f74c
How would I do it via the command line?
Kind Regards,
Adrian Smith
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
find /var/www/vhosts/test.com/h ttpdocs/re sults/ -name \*_batch_upload.csv -exec rm {} \;
ASKER
Hi Kent
Many thanks for a fast response.
Kind Regards,
Adrian Smith
Many thanks for a fast response.
Kind Regards,
Adrian Smith
rm -f /var/www/vhosts/test.com/h
Or a recursive find
find /var/www/vhosts/test.com/h