DirtyMonkey All American 4269 Posts user info edit post |
i've got a huge list of files to delete, some of which are named with special characters such as ')'. an example would be: t_43466).jpg
i *could* delete using the inode, but i'm hoping there is an easier solution like escaping the character or something like that. any suggestions?3/25/2008 12:48:22 PM |
darkone (\/) (;,,,;) (\/) 11610 Posts user info edit post |
does this not work:
rm -fr *)* 3/25/2008 12:55:16 PM |
DirtyMonkey All American 4269 Posts user info edit post |
sorry, i should have been more clear. i have about 100,000 files to delete, but i'm not deleting them based off the filename. i build a list of rm commands for each file that is flagged to be deleted, and some of them have a ) or other character in them. this is the error i get:
bash: rm -v ./6/6/t_43466).jpg; bash: syntax error near unexpected token `)'
3/25/2008 12:58:29 PM |
GraniteBalls Aging fast 12262 Posts user info edit post |
http://ubuntuforums.org/showthread.php?t=122103
[Edited on March 25, 2008 at 1:17 PM. Reason : use backslash or single quote] 3/25/2008 1:16:20 PM |
DirtyMonkey All American 4269 Posts user info edit post |
single quote worked great. thanks.
i should have googled the error message, dur. 3/25/2008 1:29:15 PM |
GraniteBalls Aging fast 12262 Posts user info edit post |
3/25/2008 1:29:57 PM |