restore -i -> gotcha

restore -i -> gotcha

Post by Bob Wa » Wed, 21 Oct 1992 23:33:10



A minor problem -> a big "gotcha"

Well... I discovered a minor problem with the "restore -i" command
yesterday and decided to help others avoid the same problem.  Of
course, thinking OTHERS might be dumb enough to get caught by this one
is a BIG assumption on my part :-).

I needed to restore a user's account from a backup (by inode) tape.
Since the interactive option (restore -i) makes things much easier, I
used it.

I did an "add *".  Then noticed it did not get the dozen or so dot
files, so did an "add .*".  Sure enough, the "ls" command showed all
the desired files marked with an '*' to indicate they would be
extracted from the tape, so I entered "extract" and went off to do
other things while the files were being read from the tape.

Guess what!!! The "ls" command within "restore -i" is similar to the
normal "ls -A" command... it does not show "." and ".." .

Now for the "gotcha" (yes, you guessed it): The "add .*" DOES include "..".
I'll leave the results to the imagination of the reader.

(This was AIX 3.2.2 with the "vi hang" fix installed.)

--
Bob Ware, System Administrator
Computing and Networking, Colorado School of Mines, Golden, Co 80401, USA
(303) 273-3987

 
 
 

restore -i -> gotcha

Post by Ruth Miln » Thu, 22 Oct 1992 04:06:39



Quote:>A minor problem -> a big "gotcha"
>[...]

>Now for the "gotcha" (yes, you guessed it): The "add .*" DOES include "..".
>I'll leave the results to the imagination of the reader.

This is how wildcards work. If, as root, you do a "chown someone .*", it
will change the ownership of the parent directory as well as the . files.

Agreed, it's a gotcha. But at least it's a *logical* gotcha :-).
--
Ruth Milner                          NRAO/VLA                  Socorro NM


 
 
 

restore -i -> gotcha

Post by Bob Wa » Fri, 23 Oct 1992 05:35:20



....
: Agreed, it's a gotcha. But at least it's a *logical* gotcha :-).

Ok, but keep in mind that I did not call it a "bug".  However, I am not
sure it is as consistant (logical?) as it might be.

Since "ls" showed dot files, I incorrectly assumed it showed all the
files that could be marked for extraction with an "add" command.  Since
"add .*" includes "..", it might be better if "ls" also included ".."
(like "ls -a" rather than "ls -A").  That would seem more consistant to
me.

In any event, it is really "nit-picking" compared to most problems in AIX.

--
Bob Ware, System Administrator
Computing and Networking, Colorado School of Mines, Golden, Co 80401, USA
(303) 273-3987

 
 
 

restore -i -> gotcha

Post by Michael Pa » Sat, 24 Oct 1992 21:25:24



> Since "add .*" includes "..", it might be better if "ls" also included ".."

I'm confused.  "ls .*" does what you expect.  Why isn't that consistent?

But all this talk about .* matching .. (and .) really amazes me.  I haven't
been using Unix that long but that was one of the first lessons.  The way
around it is described in the FAQ for comp.unix.questions, surely prerequisite
reading for anyone using Unix, let alone administrators.

--
+------------------------------------------------------------------------------+
 Michael Page, Maths Dept, Monash University, Clayton, Victoria, AUSTRALIA 3168

+------------------------------------------------------------------------------+

 
 
 

restore -i -> gotcha

Post by Bob Wa » Sun, 25 Oct 1992 07:17:41



: >
: > Since "add .*" includes "..", it might be better if "ls" also included ".."
:
: I'm confused.  "ls .*" does what you expect.  Why isn't that consistent?
:
: But all this talk about .* matching .. (and .) really amazes me.  I haven't
: been using Unix that long but that was one of the first lessons.  The way
: around it is described in the FAQ for comp.unix.questions, surely prerequisite
: reading for anyone using Unix, let alone administrators.

I understand what you are saying, but I think you missed the point.

Within the "restore -i" command, I executed "ls", not "ls .*".  And it
did not do what one might expect based on Unix shell commands.
Instead, it did what one would expect from the Unix shell command: "ls -A".

Of course, it was actually a subcommand within "restore -i" rather than
a Unix shell command, so there was no certainty about what it should have
done.  Unfortunately, I assumed it was giving a list of files and
directories on the tape (with an "*" by those that had already been
"added" for extraction).

But, you are right.  I was stupid.

--
Bob Ware, System Administrator
Computing and Networking, Colorado School of Mines, Golden, Co 80401, USA
(303) 273-3987

 
 
 

restore -i -> gotcha

Post by Charles Hann » Wed, 28 Oct 1992 16:32:36




> In any event, it is really "nit-picking" compared to most problems in
> AIX.

It is exactly these sorts of details that add up to make Unix
unpleasant to use.

(There are some really major flaws, too, but that's not the point.)

--

 /\ \   PGP public key available on request.  MIME and NextMail accepted.
Scheme  White hetero* atheist male (WHAM) pride!

 
 
 

1. RH 7.1 -> 7.3 migration | any gotchas?

I'm migrating 'up' from RH 7.1 -> 7.3. Any install 'gotchas' I should
be aware of? When I moved from 6.2 -> 7.1, it took quite some time,
since there were major changes in how things were done (e.g.,
xinetd.conf in 7.1 versus inetd.conf in 6.xx).

Anything known 'broken/annoying' in 7.3 that is worth planning for
(e.g., stupid things like have relaying turned off by default in
sendmail.cf in 7.1).

Thanks!

2. Boot up problem!

3. Solaris 2.1 -> install gotcha

4. FreeBSD 3.2 installation on a laptop

5. Solaris 2.4 -> 2.5 gotcha (nuked /etc/group file)

6. How to Prevent Remote Login as Root?

7. Q: 2.3 -> 2.5.1 gotchas?

8. ssl on freebsd

9. RH 4.1 -> RH 5.0 gotcha

10. <><><> MOUNTING EXTENDED PARTITION <><><>

11. Wanted: <><><> Unix Specialist <><><>

12. LILO help <><><><><><>

13. >>---> Software Jobs! >>--->