MacResource
using "rm" in Terminal - Printable Version

+- MacResource (https://forums.macresource.com)
+-- Forum: My Category (https://forums.macresource.com/forumdisplay.php?fid=1)
+--- Forum: Tips and Deals (https://forums.macresource.com/forumdisplay.php?fid=3)
+--- Thread: using "rm" in Terminal (/showthread.php?tid=78950)

Pages: 1 2 3


Re: using "rm" in Terminal - timg - 06-01-2009

If the other drive is called Marvin, the command would be:

rm -f /Volumes/Marvin/ProTools\ Free/time\ code/Image_01.mpg


Re: using "rm" in Terminal - Seacrest - 06-01-2009

Another tip: use tab completion:
"rm -f /Vol[tab]/Marv[tab]/..."


Re: using "rm" in Terminal - Fritz - 06-01-2009

'preciating the help, but .........


Bugs:~ fritz$ rm -f /Volumes/Marvin/Zevon/ProTools\ Free/time\ code/Image_01.mpg
-bash: rm -f: command not found
Bugs:~ fritz$ rm -f "/Volumes/Marvin/Zevon/ProTools Free/time code/Image_01.mpg"
-bash: rm -f: command not found
Bugs:~ fritz$ rm -f /Volumes/Marvin/Zevon/ProTools\Free/time\code/Image_01.mpg
-bash: rm -f: command not found
Bugs:~ fritz$


I'd left out a Zevon in an earlier post

Even after removing the spaces in the folder names......

Bugs:~ fritz$ rm -i /Volumes/Marvin/Zevon/ProToolsFree/timecode
-bash: rm -i: command not found


Re: using "rm" in Terminal - Seacrest - 06-01-2009

Is this a personal (non-work) computer?
It's clearly telling you that you do not have a binary for "rm" anywhere in your path.
Can you try "/bin/rm" (by itself with no arguments)?


Re: using "rm" in Terminal - Fritz - 06-01-2009

yes, my Mac at home office

Bugs:~ fritz$ /bin/rm
usage: rm [-f | -i] [-dPRrvW] file ...
unlink file

The cats must be hungry and mentally preventing this.
I'm taking their foil hats off!

OBTW. This is a real old file from like, ProTools 6, (prolly OS 9 or earlier) if that matters.
It doesn't open with anyhting I've tried. All it does is stall whatver app I thow at it.
I dunno why I saved it, but it's taking up a G. 'Course, in this day, I may surrender the G.


Re: using "rm" in Terminal - Seacrest - 06-01-2009

Try cd /Path/to/file

then ls -l to make sure it's there.

Then try sudo /bin/rm -f filename.mpg


Re: using "rm" in Terminal - Fritz - 06-01-2009

Bugs:~ fritz$ cd /Volumes/Marvin/Zevon/ProToolsFree/timecode/Image_01.mpg
-bash: cd: /Volumes/Marvin/Zevon/ProToolsFree/timecode/Image_01.mpg: Not a directory


argh!!!!!

If I just do this

cd /Volumes/Marvin/Zevon/ProToolsFree/timecode

all the files in that folder show up including the one I want to dump.

but the "sudo" doesn't work from there.


Re: using "rm" in Terminal - Seacrest - 06-01-2009

Your path env var is either empty or wrong.

try:

echo $PATH

or

printenv

I get

PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin

sudo is at /usr/bin/sudo on my Leopard.


Re: using "rm" in Terminal - Seacrest - 06-01-2009

/usr/bin/rm -f 
/Volumes/Marvin/Zevon/ProTools Free/timecode/Image_01.mpg

Should work if you are the owner of the file "Image_01.mpg."


Re: using "rm" in Terminal - Fritz - 06-01-2009

echo $PATH

same as you.

printenv I get a bunch of line including :
PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin

/usr/bin/rm -f "/Volumes/Marvin/Zevon/ProToolsFree/timecode/Image_01.mpg"

hmmmmmmmm, permission denied.