recursively changing chars in filenames

Christopher Kelley debian_i386 at msn.com
Sun Jun 28 03:33:40 UTC 2009





<snip>
Thank you, but it still gives error, because I can't cd to a dir containing spaces, like:

cd /home/user/some dir what has spaces/something

but I think I found something, "renaming using inode"
</snip>

actually..yes you can.

instead of typing "cd /home/user/some dir", type "cd /home/user/some\ dir"

--cj



On Sat, Jun 27, 2009 at 7:54 PM, Smoot Carl-Mitchell <smoot at tic.com> wrote:

On Sat, 2009-06-27 at 18:54 +0200, Soren Orel wrote:

> Hi

> I wrote a little script that removes spaces, dashes, and so on from

> the filenames in a directory ($1), and lowercase all filename letters,

> etc.

>

> how could I complete the script, that so it will "recursively" do the

> same thing?



You could stick it in "find" and have find do the recursion.



find . -type d -exec your_script {} \;

--

Smoot Carl-Mitchell

Computer Systems and

Network Consultant

smoot at tic.com

+1 480 922 7313

cell: +1 602 421 9005



--

ubuntu-users mailing list

ubuntu-users at lists.ubuntu.com

Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20090628/287caf8d/attachment.html>


More information about the ubuntu-users mailing list