[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: saber quin fitxer utilitza



On Tue, Aug 26, 2003 at 10:48:10AM +0200, pdl@sindominio.net wrote:
> 
> jo sé que /etc/init.d/icecast-server crida a /usr/bin/icecast, però no sé
> si aquest conté tota la informació que necessita l'icecast per funcionar,
> o si necessita d'algun altre fitxer. I això és el que vull saber. si hi ha
> alguna manera de saber les crides que fa un binari qualsevol. Jo em
> pensava que
> nm fitxer_qualsevol
> ho feia, però ja he vist que no...

ernest@tty1:~ $ strace -o bash.trace /bin/bash
ernest@tty1:~ $ exit
ernest@tty1:~ $ grep ^open bash.trace
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
open("/lib/libncurses.so.5", O_RDONLY)  = 3
open("/lib/libdl.so.2", O_RDONLY)       = 3
open("/lib/libc.so.6", O_RDONLY)        = 3
open("/dev/tty", O_RDWR|O_NONBLOCK|O_LARGEFILE) = 3
open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = 3
open("/etc/mtab", O_RDONLY)             = 3
open("/proc/meminfo", O_RDONLY)         = 3
open("/etc/nsswitch.conf", O_RDONLY)    = 3
open("/etc/ld.so.cache", O_RDONLY)      = 3
open("/lib/libnss_compat.so.2", O_RDONLY) = 3
open("/lib/libnsl.so.1", O_RDONLY)      = 3
open("/etc/passwd", O_RDONLY)           = 3
open("/etc/bash.bashrc", O_RDONLY|O_LARGEFILE) = 3
open("/home/ernest/.bashrc", O_RDONLY|O_LARGEFILE) = 3
open("/dev/null", O_RDONLY|O_NONBLOCK|O_DIRECTORY) = -1 ENOTDIR (Not a directory)
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 3
open("/home/ernest/.bash_history", O_RDONLY) = 3
open("/home/ernest/.bash_history", O_RDONLY) = 3
open("/etc/terminfo/l/linux", O_RDONLY) = 3
open("/etc/inputrc", O_RDONLY)          = 3

D'aquesta manera et surten alguns fitxers que el programa
obre o intenta obrir, però no sé si hi són tots.

-- 
Ernest Adrogué
eadrogue(at)gmx.net



Reply to: