Script for friendlier home partition under other OS

Magnus Therning magnus at therning.org
Mon Jun 6 22:08:18 UTC 2005


On Mon, Jun 06, 2005 at 07:56:31PM +0100, Gábor Iglói wrote:
>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.

Hmm, strange, I can't reproduce your problem with the first commandline.
Very strange. Well, what you can try is to use .??* instead of .*, it
should exclude both ./ and ../.

/M

-- 
Magnus Therning                    (OpenPGP: 0xAB4DFBA4)
magnus at therning.org
http://therning.org/magnus

Software is not manufactured, it is something you write and publish.
Keep Europe free from software patents, we do not want censorship
by patent law on written works.

Idealism is fine, but as it approaches reality the costs become
prohibitive.
     -- William Buckley Jr.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20050606/a68f84ba/attachment.sig>


More information about the ubuntu-users mailing list