Re: How do I get a list of filenames with spaces on bash?
- From: Chad <cdalten@xxxxxxxxx>
- Date: Thu, 24 Jan 2008 19:48:41 -0800 (PST)
On Jan 24, 9:38 am, Stephane Chazelas <stephane_chaze...@xxxxxxxx>
wrote:
On Thu, 24 Jan 2008 11:04:29 -0600, Ed Morton wrote:
[...]
[...]cp -- "$f" "$n" &&
rm -- "$f"
Why not mv? cp won't work great for non-regular files.
To ensure that in the event of a failure the original file is unaffected.
in that case, mv doesn't affect the file not even its inode, it
affects the current directory, it's just a rename. A failing
rename just leaves things as they are. A failing cp may leave an
unfinished copy around.
Also note that cp may not preserve file attributes like
permissions, ACLs, ownership, time stamps... (see -p option for
some of those).
And mv will preserve file attributes?
.
- Follow-Ups:
- Re: How do I get a list of filenames with spaces on bash?
- From: Stephane Chazelas
- Re: How do I get a list of filenames with spaces on bash?
- References:
- Re: How do I get a list of filenames with spaces on bash?
- From: jellybean stonerfish
- Re: How do I get a list of filenames with spaces on bash?
- From: Chad
- Re: How do I get a list of filenames with spaces on bash?
- From: Ed Morton
- Re: How do I get a list of filenames with spaces on bash?
- From: Stephane Chazelas
- Re: How do I get a list of filenames with spaces on bash?
- From: Ed Morton
- Re: How do I get a list of filenames with spaces on bash?
- From: Stephane Chazelas
- Re: How do I get a list of filenames with spaces on bash?
- Prev by Date: Deletion of MQseries* packages
- Next by Date: Sar's data in a web's browser
- Previous by thread: Re: How do I get a list of filenames with spaces on bash?
- Next by thread: Re: How do I get a list of filenames with spaces on bash?
- Index(es):
Relevant Pages
|