I need Unix help

rman


Retired Staff
Joined
Dec 24, 2002
Messages
12,637
Reaction score
168
Points
63
Location
Los Angeles, California
Your Mac's Specs
14in MacBook Pro M1 Max 32GB 2TB
I had another option, but it would have taken a lot more effort your part. Glad you found a solution. :)
 
OP
Thundermoon1994
Joined
Dec 26, 2006
Messages
495
Reaction score
7
Points
18
Location
Kent, OH
Your Mac's Specs
15" MacBook Pro w/ 2.4 GHz C2D, 4 GB RAM, 250 GB
Out of curiosity, what would the other option have been?
 

rman


Retired Staff
Joined
Dec 24, 2002
Messages
12,637
Reaction score
168
Points
63
Location
Los Angeles, California
Your Mac's Specs
14in MacBook Pro M1 Max 32GB 2TB
Move into the directory in question. Do the following command:

ls -BC1 > del

A file called del is created with all of the file in the directory listed in side. Then you edit the file del and add a rm in front of each list. Also place a double quote around each file name. Once that is done, do a

sh del

That should execute the little shell script you created.

In the cases that I had the problem you had on other flavors of Unix, that help me resolve the problem.
 
Joined
Mar 17, 2008
Messages
6,879
Reaction score
191
Points
63
Location
Tucson, AZ
Your Mac's Specs
Way... way too many specs to list.
yea, I thought about passing it through xargs too... but didn't think that would work since it'd still have to execute rm against a long file name :(
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top