Specific files in a specific directory?

Specific files in a specific directory?

Post by Tom Suzd » Sat, 21 Mar 1998 04:00:00



Still setting up my linux system and now I'm branching out and getting
packages like PCMCIA, Netscape, isapnptools, and Samba. Is there a
directory that should be used when unzipping a file? I've been putting them
in /usr/src and then unzipping/untarring them from there with some very
interesting results. PCMCIA and isapnptools made their own directories
under /usr/src and then installed files in those directories. Netscape made
one or two directories under /usr/src, but it also dumped a bunch of files
in /usr/src. Samba made /usr/src/var, /usr/src/bin, and /usr/src/etc
directories. I figured it wanted to put them in the proper /bin, /var, and
/etc directories, but was sitting in the wrong directory to start with. Is
there a standard or suggested directory to unzip / untar from so the files
should be in some proper place. I understand the concept of 'it's MY OS and
I'll put files anywhere I want them to be', but for someone just starting
out a general rule would help.

Thanks.

Tom

 
 
 

Specific files in a specific directory?

Post by Eric Buddingt » Sun, 22 Mar 1998 04:00:00



>Still setting up my linux system and now I'm branching out and getting
>packages like PCMCIA, Netscape, isapnptools, and Samba. Is there a
>directory that should be used when unzipping a file? I've been putting them
>in /usr/src and then unzipping/untarring them from there with some very
>interesting results.

This is probably not the best way to go about it. As you've seen,
there's no de facto standard for how packages are distributed.
The standard formats that exist (GNU autoconf for source, Debian
and Red Hat for binaries) are excellent, and will eventually
become ubiquitous, I think.

But if you have some non-brand-name :) binary distribution,
it's best to unpack it in a separate, clean directory, then
manually put all the files in their proper places.

Alternatively, view the archive (tar -tzvf or unzip -l)
to see what it will do when extracted, and position
yourself apppropriately before extracting.

Quote:>Netscape made
>one or two directories under /usr/src, but it also dumped a bunch of files
>in /usr/src.

On my carefully-organized system, all of Netscape is contained
in its own '.../crappy-setup' directory, with appropriate
links from where the files *should* have gone. I fear Netscape
is still thinking it's on a Windows system, where nobody
really cares if an archive barfs files all over the filesystem.
(yeah, so that was a bit uncalled-for. But I feel *better* for
having said it:)

Quote:>I understand the concept of 'it's MY OS and
>I'll put files anywhere I want them to be', but for someone just starting
>out a general rule would help.

The File System Standard (FSSTAND) is pretty good, and used
intelligently by Debian, and probably Red Hat.

In my irregular opinion:
        /sbin   files needed for emergency/boot, only used by root
        /bin    other such files, useful to everyone
        /etc    system-wide config files, system scripts
        /lib    Really Important (tm) libraries.
        /usr/*  Same classifications not less critical stuff.
        /usr/local*     Hack packages.

I think the current setup is something of a mess. I want my system
to keep packages seaparated by name, version, and architecture.
This lets me 1) see what package a file belongs to 2) keep
multiple versions of a package on the system, 3) cleanly
destroy unwanted packages, and cleanly move packages from
system to system as tarball, and 4) install packages that
have conflicting files without one overwriting the other.

I have (almost) a complete, bootable, glibc-2 system that
is set up this way, where /usr is a pure symlink tree.

Eric

 
 
 

Specific files in a specific directory?

Post by Fester Bilb » Mon, 23 Mar 1998 04:00:00



> Still setting up my linux system and now I'm branching out and getting
> packages like PCMCIA, Netscape, isapnptools, and Samba. Is there a
> directory that should be used when unzipping a file? I've been putting them

[...]

I recommend always doing a "tar tzvf" or "rpm -ql" before installing
new stuff and observe what is going to be installed where.  Often
the files use "absolute" file names (start with "/") and your only
choice is to do it "their" way or don't install it.  Some will
install xxx/*; some install *.  IIRC, the conventional place to
install "xxx" is under /usr/local/src .  I've made my own directory
under /usr/local to put such stuff so I know that what is in
/usr/local/src is stuff some tar file or weird RPM put there and
it was not put there by me "manually".

Apparently the Unix way of arranging files is, like Democracy, the
worst scheme there is, except all the others.   Most of the important
reasons for doing it this way are unneeded by us single-user,
stand-alone-computer-with-1-or-2-disks types.

 
 
 

1. checking for specific date and specific number of files

Hi,

I've got a c-shell script that is run through our job scheduler.
I need to add 2 additional checks to make sure it runs on the
correct day and the correct number of files is available to it.

How would check to make sure that it is Weds or Fri?
If it is, continue on the script if not stop the script.  This is
in case it is accidentally started on some other day of the week.

Then if it is Wed or Fri I need to check for a certain number of files
depending on the day.  The way I currently find the files is by doing this:

% ls -lt *98979*.txt | grep -v select

This command should return 3 files on Wed and 24 files on Fri.
How would should I check for the correct number of files?

Any suggestions would be greatly appreciated!
Thanks

2. LILO problem

3. host-specific <-> network-specific routing precedence

4. Reconfiguring the Kernel help

5. filter lines with a specific expression at a specific position

6. PPPD+MGETTY Question

7. Force "login" of a specific user to be redirected to a specific zone...

8. FTP

9. How to make .cgi files automatically be picked from a specific directory w/Apache

10. Finding files aged in specific directory ?

11. How can I mount ISO file to specific directory

12. Extracting TAR Files in a specific Directory

13. Find files aged in specific directory?