LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-07-2005, 10:12 AM   #1
jiawj
Member
 
Registered: Jul 2004
Location: Beijing, China
Distribution: Slackware,Redhat
Posts: 121

Rep: Reputation: 15
Question how can I find the file belong to what pkg?


my distro is slackware 9.1.

a similar example:

rpm -qf /etc/inittab

can find /etc/inittab is part of initscripts-7.31.16.EL-1

thx for any help
 
Old 03-07-2005, 10:17 AM   #2
Okie
Senior Member
 
Registered: Mar 2002
Location: Oklahoma
Posts: 1,154

Rep: Reputation: 187Reputation: 187
Code:
#
# inittab This file describes how the INIT process should set up
#  the system in a certain run-level.
#
# Version: @(#)inittab  2.04 17/05/93 MvS
#                                       2.10    02/10/95        PV
#                                       3.00    02/06/1999      PV
#                                       4.00    04/10/2002      PV
#
# Author: Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
# Modified by: Patrick J. Volkerding, <volkerdi@slackware.com>
#

# These are the default runlevels in Slackware:
#   0 = halt
#   1 = single user mode
#   2 = unused (but configured the same as runlevel 3)
#   3 = multiuser mode (default Slackware runlevel)
#   4 = X11 with KDM/GDM/XDM (session managers)
#   5 = unused (but configured the same as runlevel 3)
#   6 = reboot

# Default runlevel. (Do not set to 0 or 6)
id:4:initdefault:

# System initialization (runs when system boots).
si:S:sysinit:/etc/rc.d/rc.S

# Script to run when going single user (runlevel 1).
su:1S:wait:/etc/rc.d/rc.K

# Script to run when going multi user.
rc:2345:wait:/etc/rc.d/rc.M

# What to do at the "Three Finger Salute".
ca::ctrlaltdel:/sbin/shutdown -t5 -r now

# Runlevel 0 halts the system.
l0:0:wait:/etc/rc.d/rc.0

# Runlevel 6 reboots the system.
l6:6:wait:/etc/rc.d/rc.6

# What to do when power fails.
pf::powerfail:/sbin/genpowerfail start

# If power is back, cancel the running shutdown.
pg::powerokwait:/sbin/genpowerfail stop

# These are the standard console login getties in multiuser mode:
c1:1235:respawn:/sbin/agetty 38400 tty1 linux
c2:1235:respawn:/sbin/agetty 38400 tty2 linux
c3:1235:respawn:/sbin/agetty 38400 tty3 linux
c4:1235:respawn:/sbin/agetty 38400 tty4 linux
c5:1235:respawn:/sbin/agetty 38400 tty5 linux
c6:12345:respawn:/sbin/agetty 38400 tty6 linux

# Local serial lines:
#s1:12345:respawn:/sbin/agetty -L ttyS0 9600 vt100
#s2:12345:respawn:/sbin/agetty -L ttyS1 9600 vt100

# Dialup lines:
#d1:12345:respawn:/sbin/agetty -mt60 38400,19200,9600,2400,1200 ttyS0 vt100
#d2:12345:respawn:/sbin/agetty -mt60 38400,19200,9600,2400,1200 ttyS1 vt100

# Runlevel 4 used to be for an X window only system, until we discovered
# that it throws init into a loop that keeps your load avg at least 1 all 
# the time. Thus, there is now one getty opened on tty6. Hopefully no one
# will notice. ;^)
# It might not be bad to have one text console anyway, in case something 
# happens to X.
x1:4:wait:/etc/rc.d/rc.4

# End of /etc/inittab
 
Old 03-07-2005, 10:20 AM   #3
Okie
Senior Member
 
Registered: Mar 2002
Location: Oklahoma
Posts: 1,154

Rep: Reputation: 187Reputation: 187
that should work, it is the inittab out of slackware-10.1 but the date shows it older than 9.1 so they should be the same, copy & paste it to a text file and give it the inittab name and save it in /etc and it should work...

if anyone knows this wont work please correct me on this idea...
 
Old 03-07-2005, 10:46 AM   #4
jiawj
Member
 
Registered: Jul 2004
Location: Beijing, China
Distribution: Slackware,Redhat
Posts: 121

Original Poster
Rep: Reputation: 15
Unhappy

sorry! Okie
my english is bad.

I mean I wanna find a command that can find a file belong to what package

I can list a serial of files ownership of a slackware package by pkgtool.

but the other way round, I can't find a file belong to what package.
 
Old 03-07-2005, 10:58 AM   #5
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 53
Re: how can I find the file belong to what pkg?

Quote:
Originally posted by jiawj
my distro is slackware 9.1.

a similar example:

rpm -qf /etc/inittab

can find /etc/inittab is part of initscripts-7.31.16.EL-1

thx for any help
Code:
skalkoto@darkstar:~$ grep "etc/inittab" -i /var/log/packages/*
/var/log/packages/sysvinit-2.84-i486-51:etc/inittab.new
skalkoto@darkstar:~$
*EDIT*
For every installed package in slackware there is a file in /var/log/packages with filename, the name of the package, that contains in pure text all the files that are contained in this package

Code:
skalkoto@darkstar:~$ cat /var/log/packages/sysvinit-2.84-i486-51
PACKAGE NAME:     sysvinit-2.84-i486-51
COMPRESSED PACKAGE SIZE:     269 K
UNCOMPRESSED PACKAGE SIZE:     590 K
PACKAGE LOCATION: /mnt/cdrom/slackware/a/sysvinit-2.84-i486-51.tgz
PACKAGE DESCRIPTION:
sysvinit: sysvinit (init, the parent of all processes)
sysvinit:
sysvinit: System V style init programs by Miquel van Smoorenburg that control
sysvinit: the booting and shutdown of your system.  These support a number of
sysvinit: system runlevels, each with a specific set of utilities spawned.
sysvinit: For example, the normal system runlevel is 3, which starts agetty
sysvinit: on virtual consoles tty1 - tty6.  Runlevel 4 starts xdm.
sysvinit: Runlevel 0 shuts the system down.
sysvinit:
sysvinit:
sysvinit:
FILE LIST:
./
etc/
etc/rc.d/
etc/rc.d/rc.sysvinit.new
etc/rc.d/rc.local.new
etc/rc.d/rc.4.new
etc/rc.d/rc.6.new
etc/rc.d/rc.K.new
etc/rc.d/rc.M.new
etc/rc.d/rc.S.new
etc/inittab.new
usr/
usr/bin/
usr/bin/last
usr/doc/
usr/doc/sysvinit-2.84/
usr/doc/sysvinit-2.84/sysvinit-2.84.lsm
usr/doc/sysvinit-2.84/Install
usr/doc/sysvinit-2.84/Propaganda
usr/man/
usr/man/man1/
usr/man/man1/last.1.gz
usr/man/man5/
usr/man/man5/initscript.5.gz
usr/man/man5/inittab.5.gz
usr/man/man8/
usr/man/man8/runlevel.8.gz
usr/man/man8/killall5.8.gz
usr/man/man8/shutdown.8.gz
usr/man/man8/poweroff.8.gz
usr/man/man8/init.8.gz
usr/man/man8/halt.8.gz
usr/man/man8/pidof.8.gz
usr/man/man8/reboot.8.gz
usr/man/man8/telinit.8.gz
sbin/
sbin/halt
sbin/shutdown
sbin/killall5
sbin/runlevel
sbin/initscript.sample
sbin/init.new
install/
install/doinst.sh
install/slack-desc
skalkoto@darkstar:~$

Last edited by perfect_circle; 03-07-2005 at 11:04 AM.
 
Old 03-07-2005, 11:11 AM   #6
spaceballs
Member
 
Registered: Jan 2005
Location: Dallas, TX
Distribution: Slackware-current
Posts: 248

Rep: Reputation: 30
pkgtool

You can also use the pkgtool command to see what packages and directories are installed by each slackware package.
 
Old 03-07-2005, 11:17 AM   #7
jiawj
Member
 
Registered: Jul 2004
Location: Beijing, China
Distribution: Slackware,Redhat
Posts: 121

Original Poster
Rep: Reputation: 15
thx perfect_circle

that a good ways and means

Last edited by jiawj; 03-07-2005 at 11:21 AM.
 
Old 03-07-2005, 11:24 AM   #8
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 53
Re: pkgtool

Quote:
Originally posted by spaceballs
You can also use the pkgtool command to see what packages and directories are installed by each slackware package.
I don't think pkgtool is an option in this case. He wants to find, in which package inittab is, Unless you are recommending to search one-by-one all the installed packages to find the specific file.
 
Old 03-07-2005, 12:55 PM   #9
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 53
A simple bash command (replace etc/inittab with any file):
Code:
grep -li "etc/inittab" /var/log/packages/*
You could also use http://slackware.com/pb you can search in a lot of ways there.
 
Old 03-07-2005, 08:16 PM   #10
DaHammer
Member
 
Registered: Oct 2003
Location: Planet Earth
Distribution: Slackware, LFS
Posts: 561

Rep: Reputation: 30
The file you want is MANIFEST.bz2. It's on the CDs in the slackware directory. It contains a complete list of every single file on a default slackware system, as well as the package that installed it.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Any aptitude command to find out what packages belong to a virtual package? Akhran Debian 9 11-05-2005 09:40 PM
pkg-config cannot find gtkglext siht Linux - Software 3 07-15-2005 08:17 PM
find files that do not belong to any package? Pinchiukas Slackware 10 09-15-2004 07:26 AM
Can a file belong to more than one group? lostboy Linux - General 2 11-08-2003 11:14 AM
How to install *.pkg file futurist Linux - Software 1 03-20-2003 04:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration