1 |
· Shawn Haggett <podge@××××××××.com>: |
2 |
|
3 |
> Philip Webb wrote: |
4 |
>> 060821 Shaochun Wang wrote: |
5 |
>>> Does anyone know the function of .keep file in a directory? |
6 |
>> |
7 |
>> It prevents the dir from being deleted by a script, |
8 |
>> eg esp during a package update. |
9 |
>> |
10 |
> I believe it is to do with how tar handles directories. If there are no |
11 |
> files in a dir, tar won't include the dir in the archive. |
12 |
|
13 |
Nope, tar doesn't have anything to do with this. |
14 |
|
15 |
alexander@knospe:~/tmp/tartest$ mkdir emptydir |
16 |
alexander@knospe:~/tmp/tartest$ tar cfv test.tar emptydir |
17 |
emptydir/ |
18 |
alexander@knospe:~/tmp/tartest$ ls -la emptydir/ |
19 |
insgesamt 0 |
20 |
drwxr-xr-x 2 alexander alexander 1 2006-08-21 13:24 . |
21 |
drwxr-xr-x 3 alexander alexander 16 2006-08-21 13:24 .. |
22 |
alexander@knospe:~/tmp/tartest$ rm -r emptydir |
23 |
alexander@knospe:~/tmp/tartest$ ls -la emptydir |
24 |
ls: emptydir: No such file or directory |
25 |
alexander@knospe:~/tmp/tartest$ tar xvf test.tar |
26 |
emptydir/ |
27 |
alexander@knospe:~/tmp/tartest$ ls -la emptydir |
28 |
insgesamt 0 |
29 |
drwxr-xr-x 2 alexander alexander 1 2006-08-21 13:24 . |
30 |
drwxr-xr-x 3 alexander alexander 24 2006-08-21 13:25 .. |
31 |
|
32 |
|
33 |
Alexander Skwar |
34 |
-- |
35 |
Das Problem ist der Parser. Der ist nicht fuzzy genug. |
36 |
-- Klaus Knopper |
37 |
|
38 |
|
39 |
-- |
40 |
gentoo-user@g.o mailing list |