The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > OS X (Apple)
Google UNIX.COM
Home Forums Register Rules & FAQ Members List Arcade Search Today's Posts Mark Forums Read


OS X (Apple) OS X is a line of Unix-based graphical operating systems developed, marketed, and sold by Apple.


Other UNIX.COM Threads You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Script to rename files cpreovol Shell Programming and Scripting 3 04-01-2008 08:45 AM
rename a lot of files again ajp7701 Shell Programming and Scripting 11 03-31-2008 04:36 PM
Script to rename files Dinkster UNIX for Dummies Questions & Answers 5 01-22-2008 04:55 AM
script to rename files with current date and copy it. logic0 UNIX for Dummies Questions & Answers 6 05-01-2007 02:13 AM
How to rename files? CompuTelSystem UNIX for Dummies Questions & Answers 9 05-14-2002 12:28 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-08-2004
Registered User
 

Join Date: Jan 2004
Location: Israel - Kfar Sava
Posts: 5
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
Talking Rename Files with a script ?

Hi All !!!

Is there any solution to get rid of / " * in old files names WITH A SCRIPT

(About 100 Gb of old files)

I know it can be done i just dont know how !

Hope that some one can help

Best R.

Yovel
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 02-08-2004
oombera's Avatar
Have a day :|
 

Join Date: Aug 2002
Location: Cleveland, OH
Posts: 804
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
Read this link first: Removing "Strange" files

You could try something like what they suggest, like this:
find . -name '*[^][a-zA-Z0-9#%~:,._+-]*' -print0 | xargs -0 rm

It'll find all files with those special characters and the print them, and the xargs command will remove them all. You probably want to try something like this without the xargs part first and just view the list of files to make sure you're not gonna delete anything you didn't want to!

You could also just backslash the special characters so they lose their special meaning, like:

ls | grep "filewith\"quotes"
Reply With Quote
Google UNIX.COM
Reply



Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -7. The time now is 07:44 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger

Search Engine Optimization by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102