Buscar los enlaces de un script de inicio - Electronik-Pro, Informatica, Noticas,Wordpress,Facebook,Hacking,Programas,Hosting,Dominios

En ocasiones, nos surge la necesidad de obtener la lista de enlaces a un script de inicio que hay en:
rc0.d/    rc2.d/    rc4.d/    rc6.d/    rcS.d/    
rc1.d/    rc3.d/    rc5.d/    rc.local  

Una forma de obtener dicha lista es combinando comandos. Por ejemplo, de la siguiente manera:

# ls -l $(find /etc/rc* -type l) | grep nombreservicioabuscar | cut -f1 -d"-"

Si en la línea de comandos anterior, cambio mombreservicioabuscar por el nombre de un servicio, como por ejemplo, proftpd, la cosa quedaría así:

# ls -l $(find /etc/rc* -type l) | grep proftpd | cut -f1 -d"-"

Y la salida del comando, sería más o menos así:

lrwxrwxrwx 1 root root 17 dic 15  2012 /etc/rc0.d/K01proftpd 
lrwxrwxrwx 1 root root 17 dic 15  2012 /etc/rc1.d/K01proftpd 
lrwxrwxrwx 1 root root 17 may  8 20:13 /etc/rc2.d/S03proftpd 
lrwxrwxrwx 1 root root 17 may  8 20:13 /etc/rc3.d/S03proftpd 
lrwxrwxrwx 1 root root 17 may  8 20:13 /etc/rc4.d/S03proftpd 
lrwxrwxrwx 1 root root 17 may  8 20:13 /etc/rc5.d/S03proftpd 
lrwxrwxrwx 1 root root 17 dic 15  2012 /etc/rc6.d/K01proftpd 

Publicado por primera vez en http://enavas.blogspot.com.es
09 Oct 2013

0 comentarios:

Publicar un comentario

:) :)) ;(( :-) =)) ;( ;-( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ $-) (b) (f) x-) (k) (h) (c) cheer
Click to see the code!
To insert emoticon you must added at least one space before the code.

 
Top