1 |
Neil Bothwick wrote: |
2 |
> On Fri, 01 May 2009 03:04:05 -0500, Dale wrote: |
3 |
> |
4 |
> |
5 |
>>> Tar needs to be given files or directories to include, you didn't and |
6 |
>>> that's why it refused to make an empty archive. Since -C chnges to the |
7 |
>>> directory you want to backup, you use . to tell it to backup the (now) |
8 |
>>> current directory. |
9 |
>>> |
10 |
> |
11 |
> |
12 |
>> Would using a wild card work? Like this; /mnt/gentoo/* Just curious. |
13 |
>> |
14 |
> |
15 |
> No, because the -C has already changed the working directory |
16 |
> to /mnt/gentoo, so /mnt/gentoo/* would go back to where you were before |
17 |
> (because of the leading/). Using * on its own wouldn't work, because |
18 |
> the shell would expand it before running the tar command. Also, using |
19 |
> * would exclude hidden files. You've been given a working command, why |
20 |
> look for a more complex but flawed alternative? |
21 |
> |
22 |
|
23 |
True, just learning a little bit. I get these wild hairs every once in |
24 |
a while. lol |
25 |
|
26 |
|
27 |
> tar -C somewhere -blah |
28 |
> |
29 |
> is equivalent to |
30 |
> |
31 |
> cd somewhere |
32 |
> tar -blah |
33 |
> cd ${OLDPWD} |
34 |
> |
35 |
> and workd for both creation and extraction. As you are already using it |
36 |
> for extraction, why not maintain consistency and use it for creation too? |
37 |
> |
38 |
> |
39 |
>> And to think that I thought a period was only needed for the end of a |
40 |
>> sentence. Learn something new every day I guess. |
41 |
>> |
42 |
> |
43 |
> . = current directory |
44 |
> .. = parent directory |
45 |
> |
46 |
> |
47 |
|
48 |
Should those dots make my light bulb shine brighter? I did forget about |
49 |
those tho. It's been a while since I used those too. You know, cd .. |
50 |
goes up one level. |
51 |
|
52 |
Thanks. |
53 |
|
54 |
Dale |
55 |
|
56 |
:-) :-) |