<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="es">
	<id>http://wiki.cabal.mx/index.php?action=history&amp;feed=atom&amp;title=Curso_de_Programaci%C3%B3n_en_Bash%2FS22.sh</id>
	<title>Curso de Programación en Bash/S22.sh - Historial de revisiones</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.cabal.mx/index.php?action=history&amp;feed=atom&amp;title=Curso_de_Programaci%C3%B3n_en_Bash%2FS22.sh"/>
	<link rel="alternate" type="text/html" href="http://wiki.cabal.mx/index.php?title=Curso_de_Programaci%C3%B3n_en_Bash/S22.sh&amp;action=history"/>
	<updated>2026-04-16T06:32:36Z</updated>
	<subtitle>Historial de revisiones para esta página en el wiki</subtitle>
	<generator>MediaWiki 1.32.1</generator>
	<entry>
		<id>http://wiki.cabal.mx/index.php?title=Curso_de_Programaci%C3%B3n_en_Bash/S22.sh&amp;diff=8711&amp;oldid=prev</id>
		<title>Rrc: /* S22.sh */</title>
		<link rel="alternate" type="text/html" href="http://wiki.cabal.mx/index.php?title=Curso_de_Programaci%C3%B3n_en_Bash/S22.sh&amp;diff=8711&amp;oldid=prev"/>
		<updated>2015-04-24T02:46:26Z</updated>

		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;S22.sh&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Página nueva&lt;/b&gt;&lt;/p&gt;&lt;div&gt;__NOTOC__&lt;br /&gt;
* [[:#S22.sh | S22.sh]]&lt;br /&gt;
** [[:#Resultado | Resultado]]&lt;br /&gt;
** [[:#Explicación | Explicación]]&lt;br /&gt;
&lt;br /&gt;
== S22.sh ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;GESHI_FANCY_LINE_NUMBERS&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# Buscador archivos  SUID&lt;br /&gt;
&lt;br /&gt;
for match in $(find /usr/sbin -type f -perm /4000 -print)&lt;br /&gt;
  do &lt;br /&gt;
    echo &amp;quot;\$match is: $match&amp;quot;&lt;br /&gt;
    echo -e &amp;quot;\tEl dueño es: $(ls -al $match | cut -d &amp;#039; &amp;#039; -f 3)&amp;quot;&lt;br /&gt;
    echo -e &amp;quot;\tEl grupo es: $(ls -al $match | cut -d &amp;#039; &amp;#039; -f 4)&amp;quot;&lt;br /&gt;
    echo -e &amp;quot;\tSus derechos son: $(ls -al $match | cut -c 2-10)&amp;quot;&lt;br /&gt;
    echo -e &amp;quot;\tEl tamaño es: $(ls -al $match | cut -d &amp;#039; &amp;#039; -f 5)&amp;quot;&lt;br /&gt;
    echo&lt;br /&gt;
done&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Resultado ===&lt;br /&gt;
 &lt;br /&gt;
 [rrc@Pridd BashClase]$ ./S22.sh &lt;br /&gt;
 find: `/usr/sbin&amp;#039;: Permission denied&lt;br /&gt;
 [rrc@Pridd BashClase]$ su -&lt;br /&gt;
 Password: &lt;br /&gt;
 [root@Pridd ~]# cd ~rrc/BashClase/&lt;br /&gt;
 [root@Pridd BashClase]# ./S22.sh &lt;br /&gt;
 $match is: /usr/sbin/traceroute&lt;br /&gt;
 	El dueño es: root&lt;br /&gt;
 	El grupo es: ntools&lt;br /&gt;
 	Sus derechos son: rwsr-x---&lt;br /&gt;
 	El tamaño es: 47164&lt;br /&gt;
 &lt;br /&gt;
 $match is: /usr/sbin/userhelper&lt;br /&gt;
 	El dueño es: root&lt;br /&gt;
 	El grupo es: root&lt;br /&gt;
 	Sus derechos son: rwsr-xr-x&lt;br /&gt;
 	El tamaño es: 34552&lt;br /&gt;
 &lt;br /&gt;
 $match is: /usr/sbin/usernetctl&lt;br /&gt;
 	El dueño es: root&lt;br /&gt;
 	El grupo es: root&lt;br /&gt;
 	Sus derechos son: rwsr-xr-x&lt;br /&gt;
 	El tamaño es: 6736&lt;br /&gt;
 &lt;br /&gt;
 $match is: /usr/sbin/fileshareset&lt;br /&gt;
 	El dueño es: root&lt;br /&gt;
 	El grupo es: root&lt;br /&gt;
 	Sus derechos son: rwsr-xr-x&lt;br /&gt;
 	El tamaño es: 10787&lt;br /&gt;
 &lt;br /&gt;
 $match is: /usr/sbin/traceroute6&lt;br /&gt;
 	El dueño es: root&lt;br /&gt;
 	El grupo es: root&lt;br /&gt;
 	Sus derechos son: rwsr-xr-x&lt;br /&gt;
 	El tamaño es: 12436&lt;br /&gt;
 &lt;br /&gt;
 $match is: /usr/sbin/pppd&lt;br /&gt;
 	El dueño es: root&lt;br /&gt;
 	El grupo es: root&lt;br /&gt;
 	Sus derechos son: rwsr-xr-t&lt;br /&gt;
 	El tamaño es: 322132&lt;br /&gt;
  &lt;br /&gt;
 [root@Pridd BashClase]#&lt;br /&gt;
&lt;br /&gt;
=== Explicación ===&lt;br /&gt;
&lt;br /&gt;
[[Category:Programación en Bash]]&lt;br /&gt;
[[Category:CursoBash]]&lt;/div&gt;</summary>
		<author><name>Rrc</name></author>
		
	</entry>
</feed>