Re: Spaces in file names
- From: "Leslie Rhorer" <lrhorer@xxxxxxxxxxx>
- Date: Sun, 30 Dec 2007 21:25:26 -0600
The suggestion shown below won't work. As I said in theoriginal post, I
already thought of this. I'm not just adding an extension or something like
that. As an example of exactly what I need to do, I need to change the file
named "The Hunt for Red October (Recorded 10/10/2007 18:03).TiVo" to "Hunt
for Red October, The (Recorded 10/10/2007 18:03).TiVo".
"Paul Pluzhnikov" <ppluzhnikov-nsp@xxxxxxxxx> wrote in message
news:m3y7bbk4r9.fsf@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
"Leslie Rhorer" <lrhorer@xxxxxxxxxxx> writes:
OK, here's the problem. I need to automatically manipulate the file
names
of a number of files whose filenames have spaces in them.
Here is an example:
$ touch "a b" "c d" "e f g"
$ ls -1
a b
c d
e f g
$ find . -type f | while read line; do mv "$line" "$line.bak"; done
$ ls -1
a b.bak
c d.bak
e f g.bak
Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
.
- Follow-Ups:
- Re: Spaces in file names
- From: Paul Pluzhnikov
- Re: Spaces in file names
- From: John Reiser
- Re: Spaces in file names
- References:
- Spaces in file names
- From: Leslie Rhorer
- Re: Spaces in file names
- From: Paul Pluzhnikov
- Spaces in file names
- Prev by Date: Re: Spaces in file names
- Next by Date: Re: Spaces in file names
- Previous by thread: Re: Spaces in file names
- Next by thread: Re: Spaces in file names
- Index(es):
Relevant Pages
|