How to rm files - Mac OS?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers How to rm files - Mac OS?
# 1  
Old 05-02-2014
How to rm files - Mac OS?

I am trying to rm files. This is the command:

Code:
find . -name '*Restored*' |xargs rm {} \;

This command keeps giving the message "unterminated quote" .. Why? I am on a MAC O/S. I have tried also -exec and it doesn't work.
# 2  
Old 05-02-2014
What does the command:
Code:
printf "%s\n" *Restored*

print? Are there any single-quotes, double-quotes, spaces, or tabs in the output? (If there are, your pipeline won't work.)

Either of the following should work:
Code:
find . -name '*Restored*' -exec rm {} +
find . -name '*Restored*' -exec rm {} \;

with the 1st one running faster if there is more than one file found to be removed.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

6 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

move sco openserver files to mac

What do I need to be able to move files (bsh scripts) from sco 5.0.7. to the unix side of mac 10.6.4? I tried moving them via a usb floppy drive but I get an error the disk is not readable. Would macports or fink help or should I simply load sco in parallels or is there another possible solution?... (1 Reply)
Discussion started by: powwm
1 Replies

2. OS X (Apple)

installing binary files on the mac

Hi I am mainly using unix to run programs. My current problem is that I have a hard time installing programs (binary format) on my mac. I tried install and make but it does not work.. perhaps someone can help me out. thanks (2 Replies)
Discussion started by: phil_heath
2 Replies

3. Shell Programming and Scripting

script to compare two files of mac address

Hi I need to write a bash shell script. I have two separate text files. One file contains a list of MAC addresses taken from a network scan, the other contains a list of MAC addresses for our currently-managed devices. How can I compare these two files, and output a list of addresses that have... (6 Replies)
Discussion started by: borderblaster
6 Replies

4. Shell Programming and Scripting

Toggle Hidden Files Mac OS X

Hi all, I have been using Ubuntu for 2 years now, and a few days ago I bought a Macbook. This is my first time using a Mac, so I have spent the better of two days learning the user interface, and configuring my Macbook. One thing I noticed is that there is no easy way to turn on and off hidden... (0 Replies)
Discussion started by: Omniwheel
0 Replies

5. Windows & DOS: Issues & Discussions

Mac.. PC.. how do I share files with each other on the same router???

OKay so.. I have a mac at web design company office, and a PC at home.. I want to be able to send the Mac files.. We are using the same modem that's hooked up through out a router!! How would I do this.. I'm new to this part so talk to me like I'm 2!!! thanks.. (2 Replies)
Discussion started by: pattersonz
2 Replies

6. UNIX for Dummies Questions & Answers

Transfer Files from old Mac to a Linux box?

The other half has informed me that I gotta get my own Internet box (been using her's for over ten years) and my ancient Mac SE30 (when's the last time you heard about one of those) has a bunch of Excel and Word files that I want to move to the next machine. I know that I can spend significant... (3 Replies)
Discussion started by: wsimpso1
3 Replies
Login or Register to Ask a Question