Sometime just before Sunday 28 April 2002 12:12 pm Bob Miller Wrote
about:[EUG-LUG:2447] Re: asynchronous file access: ? use chattr +S ?
Rename is cool :) I just recently used it a few times, and was very happy
with what I could do with it (much more than mv).
I do have a question about grep and stuff... I would like to replace text
with different text (like change alt= tags to title= or duplicate alt tags to
title tags... so, If i have something like
<a href="www.rocksolidnetworks.com"><img src="rock.jpg" alt="picture of
rock"></a>
and I want
<a href="www.rocksolidnetworks.com"><img src="rock.jpg" alt="picture of rock"
title="picture of a rock"></a>
What is the easiest way (yes, I could read awk, and sed and grep...) but I
basicly just want a rename for inside files (not just filenames).
Jamie
: Neil Parker wrote:
: > As mentioned above, a move (rename) is safe.
:
: Neil gave lots of good information.
:
: But remember that the mv command sometimes does a rename, and
: sometimes does a copy. If the destination file is on a different
: filesystem than the original, then the file is copied and the original
: is deleted, and copying is not an atomic operation. Here's a safe way
: to move the mailbox even across filesystems..
:
: tmpfile="`mktemp /var/spool/mail/tmpfile.XXXXXXXX`"
: mv /var/spool/mail/bucket "$tmpfile"
: mv "$tmpfile" someOtherFile
:
: By putting tmpfile in the same directory as the original, you ensure
: that they're both in the same filesystem, so mv will do an atomic
: rename.
:
: Rename is an atomic operation even across NFS, so you're still safe
: even if your mailbox is NFS mounted.
--
for setting/changing your eug-lug mailinglist subscription use this website:
http://wWw.RockSolidNetworks.com/eug-lug.html
no microsoft products were used to produce this message.