[kdepim-users] Path (was: 20090723KP -- Copying KMail)

Kevin Krammer kevin.krammer at gmx.at
Sun Jul 26 10:13:15 BST 2009


On Sunday, 2009-07-26, Bruce MacArthur wrote:

> If I understand everything correctly, I can boot to Kubuntu Jaunty and,
> in Konsole, change directories
> to /suse102/home/bruce/.kde/share/apps/KMail/mail/.KMail-Import.directory.

At least one level to deep, actually I wouldn't even step into "mail", just cd 
to /suse102/home/bruce/.kde/share/apps/KMail

> Here I can "tar  -cvjf  /home/bu4lu3si1/suseKMail.tar.bz2
> suse102/home/bruce/.kde/share/apps/kmail/mail/.KMail-Import/directory"
>
> What I intend to do by that command is to put the tarball from my
> opensuse partition in my Jaunty home folder (/home/bu4lu3si1)

As Werner already wrote, the second path is not what you want to have.
Basically you can use any path for the archive file, e.g. 
/home/bu4lu3si1/suseKMail.tar.bz2, but the path used to specifiy the directory 
or files to archive will also end up in the archive file and be restored when 
extracting.

So if you do

cd  /suse102/home/bruce/.kde/share/apps/KMail
tar -cvjf  /home/bu4lu3si1/suseKMail.tar.bz2 mail/

You will get an archive file in  /home/bu4lu3si1/ which contains one directory 
called "mail/".
Extracting this will create a directory "mail/" in whatever directory you run 
"tar -xvjf" in.

This means that Werner's suggestion will not include any top level directory, 
so this is probably even easier.

cd /suse102/home/bruce/.kde/share/apps/KMail/mail

tar -cvjf  /home/bu4lu3si1/suseKMail.tar.bz2 .

You will get an archive file in /home/bu4lu3si1/  which only contains files 
and sub directories of "mail/", not he "mail/" directory itself [1].

> Then I can change directories
> to /home/bu4lu3si1/.kde/share/apps/KMail/mail and
> tar -xvjf  /home/bu4lu3si1/suseKMail.tar.bz2

Correct, or /home/bu4lu3si1/.kde/share/apps/KMail if "mail/" is part of the 
archive.

> The other question in my mind is "When I am in 'bu4lu3si1 at ma4ca4su1ru4'
> in the Konsole, do I create confusion and trouble by
> specifying '/home/bu4lu3si1/.kde/share/apps/kmail/mail'?  Should I
> simply say '.kde/share/apps/kmail/mail'?"

That was the intend of the orginal suggestion, i.e. running the tar commands 
from the same conceptual level, i.e. the home directory.
Of course the mail directory itself or the KMail data directory can be used as 
well, like the suggestion above demonstrate.

Cheers,
Kevin

[1] I personally prefer to have at least one directory level in an archive so 
I can extract it whereever I want without filling the current directory with 
lots of files. Both variants are funcationally equivalent, mainly a matter of 
taste.
-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdepim-users/attachments/20090726/d6974fff/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM users mailing list
kdepim-users at kde.org
https://mail.kde.org/mailman/listinfo/kdepim-users


More information about the kdepim-users mailing list