D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] lshw -html UPDATED

 

On Tue, 9 Feb 2010, tom wrote:

I was aware I could use brute force to change it but its always nice to put everything back as it was - nothing more annoying that your system going wobbly because someone's put in sensible users for security reasons and you go and stop them writing by accidentally leaving something owned by root

  cp -a file file.backup
  vi file
  ..check new file and backup - to revert:
    mv file.backup file

And note that vi (and vim) try very hard to preserve ownership and file modes, so if you edit a users file with vi as root, it will be re-written with the same user and file ownerships as before.

Other editors may vary...

Gordon

--
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html