Script for friendlier home partition under other OS
Gábor Iglói
mdjake at gmail.com
Mon Jun 6 18:56:31 UTC 2005
Hello!
I'm trying to solve the following problem with an init/shutdown script:
If one is holding his/her home on a different partition from / and
using a dual-boot system it is a bit confusing that the hidden
.folders and .files are all visible under another OSs.
I'd like to solve the problem with a pair of scripts: on Ubuntu bootup
it would untar all hidden folders/files of the user's home folder from
a tar file somewhere in the filesystem. And during shutdown another
script would tar all of the user's hidden home folders and files - but
just these. With a bootup check for the existence of the tar file I
could avoid situations when the user exited Linux foolishly thus
missing the creation of the tar file (e.g. after pressing the Reset
button by accident).
Problem is that I didn't manage to find out the correct syntax for
tarring ONLY the hidden files/folders. I tried the following:
cd /home/user
tar -cvzf /someplace/home.tgz .*
This will tar the whole home folder hidden an normal files too.
tar -cvzf /someplace/home.tgz --exclude=./* .*
This does the same - don't understand why.
More information about the ubuntu-users
mailing list