ยท Shawn Haggett <[EMAIL PROTECTED]>:

> Philip Webb wrote:
>> 060821 Shaochun Wang wrote:
>>> Does anyone know the function of .keep file in a directory?
>> 
>> It prevents the dir from being deleted by a script,
>> eg esp during a package update.
>> 
> I believe it is to do with how tar handles directories. If there are no
> files in a dir, tar won't include the dir in the archive.

Nope, tar doesn't have anything to do with this.

[EMAIL PROTECTED]:~/tmp/tartest$ mkdir emptydir
[EMAIL PROTECTED]:~/tmp/tartest$ tar cfv test.tar emptydir
emptydir/
[EMAIL PROTECTED]:~/tmp/tartest$ ls -la emptydir/
insgesamt 0
drwxr-xr-x 2 alexander alexander  1 2006-08-21 13:24 .
drwxr-xr-x 3 alexander alexander 16 2006-08-21 13:24 ..
[EMAIL PROTECTED]:~/tmp/tartest$ rm -r emptydir
[EMAIL PROTECTED]:~/tmp/tartest$ ls -la emptydir
ls: emptydir: No such file or directory
[EMAIL PROTECTED]:~/tmp/tartest$ tar xvf test.tar
emptydir/
[EMAIL PROTECTED]:~/tmp/tartest$ ls -la emptydir
insgesamt 0
drwxr-xr-x 2 alexander alexander  1 2006-08-21 13:24 .
drwxr-xr-x 3 alexander alexander 24 2006-08-21 13:25 ..


Alexander Skwar
-- 
Das Problem ist der Parser.  Der ist nicht fuzzy genug.
                -- Klaus Knopper


-- 
gentoo-user@gentoo.org mailing list

Reply via email to