1 |
Philip Webb wrote: |
2 |
> 060821 Shaochun Wang wrote: |
3 |
>> Does anyone know the function of .keep file in a directory? |
4 |
> |
5 |
> It prevents the dir from being deleted by a script, |
6 |
> eg esp during a package update. |
7 |
> |
8 |
I believe it is to do with how tar handles directories. If there are no |
9 |
files in a dir, tar won't include the dir in the archive. So to ensure |
10 |
packages create dirs that will be needed by that package (i.e. an empty |
11 |
data directory, or empty log directory or some such) there is a .keep |
12 |
file placed in that directory. This will cause tar to create the |
13 |
directory when the archive is unpacked. |
14 |
|
15 |
Shawn |
16 |
-- |
17 |
gentoo-user@g.o mailing list |