954,525 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Bulk deleting of files with bash/shell

Hi,

I am trying to delete all files that end in .csv within a directory.

I'm not sure how to go about this,

I am using bash and the command I used was;

rm '/home/eeng/ME_project/Big_Users/*.csv'


New to this scripting so not too sure where i'm going wrong.

Any ideas?

Thanks.

N

niall_heavey
Light Poster
28 posts since Jan 2009
Reputation Points: 10
Solved Threads: 0
 

Got this sorted!

niall_heavey
Light Poster
28 posts since Jan 2009
Reputation Points: 10
Solved Threads: 0
 
Got this sorted!


you can cd into the directory and then use

rm -rf *csv
naiksuresh
Newbie Poster
4 posts since Aug 2010
Reputation Points: 10
Solved Threads: 0
 

you can cd into the directory and then use

rm -rf *csv


There is no need to cd into the directory; just leave off the quotes:

rm /home/eeng/ME_project/Big_Users/*.csv
cfajohnson
Junior Poster
196 posts since Dec 2008
Reputation Points: 25
Solved Threads: 23
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: