Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
sed and file modification times
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
augury
l33t
l33t


Joined: 22 May 2004
Posts: 722
Location: philadelphia

PostPosted: Fri Dec 17, 2010 8:47 pm    Post subject: sed and file modification times Reply with quote

I used to use app-txt/rpl to "replace text" in files without changing the mod times, which could cause build tools rebuild the files, I lose my changes and my mind.

rpl is now a python app. The files all show modification time changes.

Is there a way to sed my files without changing file mod times? It seems a bit unusual. I'm guessing rpl recorded the time and then set it back again when it was done.
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9555
Location: beyond the rim

PostPosted: Fri Dec 17, 2010 8:51 pm    Post subject: Reply with quote

Well, you could make a copy of your files, edit those, use `touch --reference` to reset the mtime using the originals as reference and rename the copy back. Put it into a simple script if you need it on a regular basis.
Back to top
View user's profile Send private message
augury
l33t
l33t


Joined: 22 May 2004
Posts: 722
Location: philadelphia

PostPosted: Sat Dec 18, 2010 8:52 am    Post subject: Reply with quote

I Think the one rpl may be masked. I got it to go. The one in portage said something about using nano. The touching thing soundis interesting. A few snags but it seems to run ok. Didn't even do everything i wanted to glibc. The programings is good.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum