Re: Home Directory Clutter...
On Tuesday 14 May 2002 2:41 pm, Charles Marcus wrote:
> p.s. as a temporary workaround, is there a system level solution for hiding
> hidden files/directories from normal users, so that even if they enable
> 'View Hidden Files' from their preferred file manager, they would still not
> see them?
Not that I know of, but I do have an idea.
try the command;
tar zcv `find -regex '\.\/\.\w*'` -f test.tgz
in your home directory and make sure you get it exactly right. This will put
all the files which are of the form ./.foobar
and ./.foobar/whatever
and put them into an archive. This could be put into a script something like
this;
#!/bin/bash
cd /home
for i in *
do
cd $i
tar zcv `find -regex '\.\/\.\w*'` -f /someplacesafe/$i.tgz
cd ..
echo "user $i has been processed"
done
The find bit sorts out which directories and files are selected for archiving,
and it may well be a bit too inclusive, but you can change this by replacing
"find" with a list (only in " quotes if there are spaces involved) of the
directories abd files you consider vital.
This can be set up as an overnight job with cron, so that there is always
yesterdays settings as a backup. So the most I can imagine someone loosing is
a days setting changes, perhaps an addition to an addressbook or something.
Mail is stored elsewhere hopefully.
Then a script for easy retrieval can be set up. I will do it for you if you
get stuck.
Good luck
--
Richard, Sheffield, UK.
--
To UNSUBSCRIBE, email to lsb-discuss-request@lists.linuxbase.org
with subject of "unsubscribe". Trouble? Email listmaster@lists.linuxbase.org
Reply to: