 |
 |
Command for deleting Windows junk files from a directory?
|
 |
|
 |
|
Professional Poster
Join Date: Jun 2003
Status:
Offline
|
|
I'm moving a few thousand images file off a Windows 2000 system onto a Mac. When opened in Finder, I see three files for each image:
image.jpg
image.jpg:?Q301sldxJoudresxAaaqpcawXc:$DATA
image.jpg:{4c8cc155-6c1e-11d1-8e41-00c04fb9386d}:$DATA
(the strings after the imagename.jpg: appear to be identical for every image)
I'm assuming that the additional two files are something to do with Window's file permissions (or something). I don't need them.
Going into a Finder window to delete them is painfully slow, so how do I delete them in Terminal?
Doing a
"rm *:$DATA"
just returns
"DATA: undefined variable".
10.2.8 running tcsh. Relative Terminal newbie.
Thanks guys.
|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Nov 2001
Location: State of Denial
Status:
Offline
|
|
Try
rm *:\$DATA
(note backslash).
|
|
[Wevah setPostCount:[Wevah postCount] + 1];
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Sep 2001
Location: Chico, CA and Carlsbad, CA.
Status:
Offline
|
|
Originally posted by Sherwin:
Doing a
"rm *:$DATA"
just returns
"DATA: undefined variable".
Ahh, the command you issued is telling the shell to look for a variable called "DATA" (the dollar sign tells the shell that whatever follows is the name of a variable), and since you don't have one, it errors. You can either use single quotes or escape the dollar sign like Wevah suggested above. As a general rule, double quotes are really only good for escaping simple characters like spaces.
I'm not sure of the specifics of single and double quotes and their strictness, but single quotes are pretty good for escaping mostly everything.
(Last edited by [APi]TheMan; Jan 24, 2005 at 10:20 PM.
)
|
"In Nomine Patris, Et Fili, Et Spiritus Sancti"
|
| |
|
|
|
 |
|
 |
|
Junior Member
Join Date: May 2004
Status:
Offline
|
|
I'm not sure of the specifics of single and double quotes and their strictness, but single quotes are pretty good for escaping mostly everything.
As I understand it single and double quotes are basically the same only the double (partial) quotes expand variable names and allow for certain escape characters ( $, ` (backquote), and \ (backslash)). single (full) quotes give you EXACTLY what is between the quotes. ie.
Code:
> echo "$TERM"
xterm-color
and with single quotes
Code:
> echo '$TERM'
$TERM
more info @ http://www.tldp.org/LDP/abs/html/quoting.html
(Last edited by leira; Jan 25, 2005 at 12:22 AM.
)
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Jun 2003
Status:
Offline
|
|
Originally posted by Wevah:
Try
rm *: \$DATA
(note backslash).
This worked - thanks!
Originally posted by [APi]TheMan:
You can either use single quotes or escape the dollar sign like Wevah suggested above. As a general rule, double quotes are really only good for escaping simple characters like spaces.
Possible to use wildcards within those quotes or does it just escape the * too?
(edit: sorry, leira has just answered this!)
Thanks for the help guys. 
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|