Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
OPERATIVOS
Crear un archivo que contenga un resumen de los módulos o drivers que están instalados en el
Ubuntu Linux
//pegar
//escape :x enter
Crear un archivo que contenga una lista de los dispositivos PCI del computador con ubuntu.
//pegar
//escape :x enter
root@ubuntu:/etc# cd
root@ubuntu:~# cd /home
root@ubuntu:/home# ls
ubuntu
root@ubuntu:/home# cd
root@ubuntu:~# cd /home/ubuntu/
root@ubuntu:/home/ubuntu# ls
Desktop Documentos Imágenes Música Plantillas Público tareas varEntorno Vídeos
root@ubuntu:/home/ubuntu# cd tareas
root@ubuntu:/home/ubuntu/tareas# ls
achivosEtc fechayhora fechayhoramasEtc mipasswd resumenMod varEntorno
archivosEtc fechayhoraEtc listadoDirTareas modulosypci resumenPci
root@ubuntu:/home/ubuntu/tareas# vi mipasswd
//pegar
//escape :x enter
Denegar atributos de lectura, escritura y ejecución al grupo y los otros en el directorio pruebas.
(Puede que aparezcan otros archivos al ejecutar ls, fue porque dejé esto para el final porque no
podía hacerlo)
Denegar atributos de lectura, escritura y ejecución al grupo y los otros en el directorio pruebas.
ubuntu@ubuntu:~/pruebas$ vi varEntorno
//pegar
//escape :x enter
ubuntu@ubuntu:~/pruebas$ cd
ubuntu@ubuntu:~$ ls
Desktop Imágenes Plantillas Público Vídeos
Documentos Música pruebas varEntorno
ubuntu@ubuntu:~$ mv pruebas tareas
ubuntu@ubuntu:~$ ls
Desktop Imágenes Plantillas tareas Vídeos
Documentos Música Público varEntorno
Ingresar al directorio tareas y copiar la hora del sistema en un archivo llamado “fecha.txt”
ubuntu@ubuntu:~$ cd tareas
ubuntu@ubuntu:~/tareas$ ls
mipasswd modulosypci resumenMod resumenPci varEntorno
ubuntu@ubuntu:~/tareas$ touch fecha ///
ubuntu@ubuntu:~/tareas$ ls
fecha mipasswd modulosypci resumenMod resumenPci varEntorno
ubuntu@ubuntu:~/tareas$ date
vie abr 8 00:03:14 UTC 2011
ubuntu@ubuntu:~/tareas$ vi fecha
//pegar
//escape :x enter
ubuntu@ubuntu:~$ sudo su
root@ubuntu:/home/ubuntu# cd
root@ubuntu:~# cd /etc
root@ubuntu:/etc# ls -l
total 651
drwxr-xr-x 8 root root 887 2009-04-20 14:06 acpi
-rw-r--r-- 1 root root 2986 2009-04-20 13:59 adduser.conf
drwxr-xr-x 3 root root 40 2009-04-20 14:02 alsa
drwxr-xr-x 2 root root 60 2011-04-07 20:24 alternatives
-rw-r--r-- 1 root root 395 2008-09-02 23:37 anacrontab
drwxr-xr-x 7 root root 101 2009-04-20 14:06 apm
drwxr-xr-x 2 root root 90 2009-04-20 14:06 apparmor
drwxr-xr-x 6 root root 60 2011-04-07 20:25 apparmor.d
drwxr-xr-x 3 root root 54 2009-04-20 14:06 apport
drwxr-xr-x 4 root root 80 2011-04-07 20:24 apt
-rw-r----- 1 root daemon 144 2009-04-17 07:53 at.deny
drwxr-xr-x 3 root root 91 2009-04-20 14:09 avahi
-rw-r--r-- 1 root root 1733 2009-03-02 14:22 bash.bashrc
-rw-r--r-- 1 root root 226839 2009-02-05 08:02 bash_completion
drwxr-xr-x 2 root root 73 2009-04-20 14:06 bash_completion.d
-rw-r--r-- 1 root root 332 2009-04-09 06:12 bindresvport.blacklist
drwxr-xr-x 2 root root 89 2009-04-20 14:09 bluetooth
-rw-r--r-- 1 root root 6924 2008-06-19 03:52 bogofilter.cf
drwxr-xr-x 2 root root 45 2009-04-20 14:04 bonobo-activation
-rw-r--r-- 1 root root 33 2009-04-20 14:09 brlapi.key
drwxr-xr-x 2 root root 3102 2009-04-20 14:09 brltty
-rw-r--r-- 1 root root 18381 2009-03-18 03:20 brltty.conf
drwxr-xr-x 3 root root 25 2009-04-20 13:59 ca-certificates
-rw-r--r-- 1 root root 6282 2009-04-20 13:59 ca-certificates.conf
drwxr-xr-x 2 root root 24 2009-04-20 14:06 calendar
-rw-r--r-- 1 root root 230 2009-04-18 05:34 casper.conf
drwxr-s--- 2 root dip 33 2009-04-20 14:06 chatscripts
drwxr-xr-x 2 root root 75 2009-04-20 14:09 checkbox.d
drwxr-xr-x 2 root root 23 2009-04-20 14:07 compizconfig
drwxr-xr-x 4 root root 42 2009-04-20 14:01 ConsoleKit
drwxr-xr-x 2 root root 768 2009-04-20 14:00 console-setup
drwxr-xr-x 3 root root 25 2009-04-20 14:04 console-tools
drwxr-xr-x 2 root root 57 2009-04-20 14:06 cron.d
drwxr-xr-x 2 root root 177 2009-04-20 14:06 cron.daily
drwxr-xr-x 2 root root 29 2009-04-20 14:06 cron.hourly
drwxr-xr-x 2 root root 55 2009-04-20 14:06 cron.monthly
-rw-r--r-- 1 root root 724 2008-11-12 15:47 crontab
drwxr-xr-x 2 root root 87 2009-04-20 14:06 cron.weekly
drwxr-xr-x 4 root lp 80 2009-04-20 14:05 cups
drwxr-xr-x 5 root root 120 2009-04-20 14:09 dbus-1
-rw-r--r-- 1 root root 2969 2009-03-24 05:30 debconf.conf
-rw-r--r-- 1 root root 4 2008-12-04 09:01 debian_version
drwxr-xr-x 2 root root 100 2011-04-07 20:24 default
drwxr-xr-x 4 root root 194 2009-04-20 14:05 defoma
-rw-r--r-- 1 root root 600 2009-03-27 22:43 deluser.conf
drwxr-xr-x 2 root root 28 2009-04-20 13:59 depmod.d
drwxr-xr-x 4 root root 92 2009-04-20 14:00 dhcp3
drwxr-xr-x 2 root root 22 2009-04-20 14:10 dictionaries-common
drwxr-xr-x 2 root root 3 2009-04-03 08:25 dm
drwxr-xr-x 3 root root 26 2009-04-20 14:03 doc-base
drwxr-xr-x 3 root root 46 2009-04-20 13:59 dpkg
-rw-r--r-- 1 root root 34 2008-02-19 04:33 e2fsck.conf
drwxr-xr-x 3 root root 29 2009-04-20 14:01 emacs
-rw-r--r-- 1 root root 122 2011-04-07 20:24 environment
drwxr-xr-x 2 root root 25 2009-04-20 14:04 esound
drwxr-xr-x 2 root root 160 2011-04-07 20:24 event.d
drwxr-xr-x 4 root root 33 2009-04-20 14:03 firefox-3.0
drwxr-xr-x 4 root root 76 2009-04-20 14:02 fonts
drwxr-xr-x 3 root root 76 2009-04-20 14:04 foomatic
-rw-r--r-- 1 root root 53 2011-04-07 20:24 fstab
-rw-r----- 1 root fuse 216 2009-03-05 17:42 fuse.conf
-rw-r--r-- 1 root root 2689 2008-03-26 17:44 gai.conf
drwxr-xr-x 2 root root 24 2009-04-20 14:09 gamin
drwxr-xr-x 7 root root 98 2009-04-20 14:01 gconf
drwxr-xr-x 7 root root 60 2011-04-07 20:24 gdm
drwxr-xr-x 3 root root 20 2009-04-20 14:03 gimp
drwxr-xr-x 3 root root 50 2009-04-20 14:05 gnome
drwxr-xr-x 2 root root 35 2009-04-20 14:06 gnome-app-install
drwxr-xr-x 3 root root 22 2009-04-20 14:03 gnome-system-tools
drwxr-xr-x 3 root root 24 2009-04-20 14:01 gnome-vfs-2.0
-rw-r--r-- 1 root root 10852 2007-04-28 02:27 gnome-vfs-mime-magic
drwxr-xr-x 2 root root 36 2009-04-20 14:06 gre.d
drwxr-xr-x 2 root root 41 2009-04-20 14:06 groff
-rw-r--r-- 1 root root 837 2011-04-07 20:24 group
-rw------- 1 root root 831 2011-04-07 20:24 group-
drwxr-xr-x 2 root root 30 2009-04-20 14:06 grub.d
-rw-r----- 1 root shadow 696 2011-04-07 20:24 gshadow
-rw------- 1 root root 690 2011-04-07 20:24 gshadow-
drwxr-xr-x 2 root root 35 2009-04-20 14:02 gtk-2.0
drwxr-xr-x 3 root root 20 2009-04-20 14:03 hal
-rw-r--r-- 1 root root 4793 2009-01-09 12:24 hdparm.conf
-rw-r--r-- 1 root root 418 2009-04-20 14:07 hesiod.conf
-rw-r--r-- 1 root root 92 2008-12-23 18:53 host.conf
-rw-r--r-- 1 root root 7 2011-04-07 20:24 hostname
-rw-r--r-- 1 root root 243 2011-04-07 20:24 hosts
-rw-r--r-- 1 root root 579 2009-04-20 14:07 hosts.allow
-rw-r--r-- 1 root root 878 2009-04-20 14:07 hosts.deny
drwxr-xr-x 2 root root 27 2009-04-20 14:05 hp
drwxr-xr-x 3 root root 25 2009-04-20 14:04 ifplugd
drwxr-xr-x 2 root root 60 2011-04-07 20:24 init.d
drwxr-xr-x 5 root root 129 2009-04-20 14:00 initramfs-tools
-rw-r--r-- 1 root root 1723 2009-03-06 19:34 inputrc
drwxr-xr-x 2 root root 98 2009-04-20 13:59 iproute2
-rw-r--r-- 1 root root 19 2009-04-13 09:33 issue
-rw-r--r-- 1 root root 12 2009-04-13 09:33 issue.net
drwxr-xr-x 3 root root 64 2009-04-20 14:04 kbd
drwxr-xr-x 5 root root 61 2009-04-20 14:04 kernel
-rw-r--r-- 1 root root 111 2009-04-20 14:00 kernel-img.conf
drwxr-xr-x 10 root root 169 2009-04-20 14:06 laptop-mode
drwxr-xr-x 2 root root 26 2009-04-20 14:00 ldap
-rw-r--r-- 1 root root 51203 2009-04-20 14:12 ld.so.cache
-rw-r--r-- 1 root root 34 2009-04-20 13:59 ld.so.conf
drwxr-xr-x 2 root root 70 2009-04-20 14:04 ld.so.conf.d
-rw-r--r-- 1 root root 3587 2009-02-14 01:22 lftp.conf
drwxr-xr-x 2 root root 3 2008-06-19 12:59 libpaper.d
-rw-r--r-- 1 root root 2570 2009-02-13 11:28 locale.alias
-rw-r--r-- 1 root root 18 2011-04-07 20:24 locale.gen
-rw-r--r-- 1 root root 118 2009-04-20 13:59 localtime
drwxr-xr-x 5 root root 79 2009-04-20 14:02 logcheck
-rw-r--r-- 1 root root 10881 2009-04-04 05:49 login.defs
-rw-r--r-- 1 root root 599 2009-01-26 18:55 logrotate.conf
drwxr-xr-x 2 root root 159 2009-04-20 14:09 logrotate.d
drwxr-xr-x 2 root root 3 2009-03-02 10:16 lsb-base
-rw-r--r-- 1 root root 3820 2009-02-07 23:33 lsb-base-logging.sh
-rw-r--r-- 1 root root 97 2009-04-13 09:25 lsb-release
-rw-r--r-- 1 root root 15752 2008-12-10 17:43 ltrace.conf
-rw-r--r-- 1 root root 111 2009-03-16 17:32 magic
-rw-r--r-- 1 root root 111 2009-03-16 17:32 magic.mime
-rw-r--r-- 1 root root 19884 2009-04-20 14:09 mailcap
-rw-r--r-- 1 root root 449 2008-06-19 12:50 mailcap.order
-rw-r--r-- 1 root root 5170 2009-03-19 10:17 manpath.config
-rw-r--r-- 1 root root 21373 2008-06-19 12:50 mime.types
-rw-r--r-- 1 root root 803 2009-02-12 15:37 mke2fs.conf
drwxr-xr-x 2 root root 250 2009-04-20 14:07 modprobe.d
-rw-r--r-- 1 root root 195 2009-04-20 14:00 modules
drwxr-xr-x 4 root root 65 2009-04-20 14:07 mono
lrwxrwxrwx 1 root root 13 2009-04-20 13:59 motd -> /var/run/motd
-rw-r--r-- 1 root root 346 2009-04-20 13:59 motd.tail
-rw-r--r-- 1 root root 935 2011-04-07 20:28 mtab
-rw-r--r-- 1 root root 624 2008-05-29 20:55 mtools.conf
-rw-r--r-- 1 root root 7670 2009-03-30 10:23 nanorc
-rw-r--r-- 1 root root 2064 2006-11-23 19:33 netscsid.conf
drwxr-xr-x 6 root root 106 2009-04-20 13:59 network
drwxr-xr-x 4 root root 98 2009-04-20 14:09 NetworkManager
-rw-r--r-- 1 root root 91 2008-12-23 18:53 networks
lrwxrwxrwx 1 root root 28 2009-04-20 13:59 nologin -> /var/lib/initscripts/nologin
-rw-r--r-- 1 root root 513 2009-04-20 14:09 nsswitch.conf
drwxr-xr-x 2 root root 60 2009-04-20 14:07 obex-data-server
drwxr-xr-x 2 root root 93 2009-04-20 14:02 openoffice
drwxr-xr-x 2 root root 3 2009-04-20 13:59 opt
-rw-r--r-- 1 root root 552 2009-03-21 09:28 pam.conf
drwxr-xr-x 2 root root 60 2011-04-07 20:24 pam.d
drwxr-xr-x 2 root root 31 2009-04-20 14:02 pango
-rw-r--r-- 1 root root 3 2009-04-20 14:04 papersize
-rw-r--r-- 1 root root 1463 2011-04-07 20:24 passwd
-rw------- 1 root root 1443 2011-04-07 20:24 passwd-
drwxr-xr-x 2 root root 28 2009-04-20 14:07 pcmcia
drwxr-xr-x 4 root root 29 2009-04-20 13:59 perl
drwxr-xr-x 5 root root 49 2009-04-20 14:03 pm
-rw-r--r-- 1 root root 7649 2009-04-20 14:07 pnm2ppa.conf
drwxr-xr-x 2 root root 31 2009-04-20 14:09 PolicyKit
-rw-r--r-- 1 root root 350 2009-04-20 14:06 popularity-contest.conf
drwxr-xr-x 4 root root 38 2009-04-20 14:02 power
drwxr-xr-x 8 root dip 299 2009-04-20 14:06 ppp
-rw-r--r-- 1 root root 497 2009-04-20 13:59 profile
drwxr-xr-x 2 root root 40 2009-04-20 14:07 profile.d
-rw-r--r-- 1 root root 2626 2009-03-05 15:06 protocols
drwxr-xr-x 2 root root 73 2009-04-20 14:09 pulse
drwxr-xr-x 2 root root 26 2009-04-20 14:07 purple
drwxr-xr-x 2 root root 30 2009-04-20 14:00 python
drwxr-xr-x 2 root root 33 2009-04-20 13:59 python2.6
drwxr-xr-x 2 root root 60 2011-04-07 20:24 rc0.d
drwxr-xr-x 2 root root 488 2009-04-20 14:09 rc1.d
drwxr-xr-x 2 root root 568 2009-04-20 14:11 rc2.d
drwxr-xr-x 2 root root 568 2009-04-20 14:11 rc3.d
drwxr-xr-x 2 root root 568 2009-04-20 14:11 rc4.d
drwxr-xr-x 2 root root 568 2009-04-20 14:11 rc5.d
drwxr-xr-x 2 root root 60 2011-04-07 20:24 rc6.d
-rwxr-xr-x 1 root root 306 2009-04-20 13:59 rc.local
drwxr-xr-x 2 root root 80 2011-04-07 20:24 rcS.d
drwxr-xr-x 2 root root 33 2009-04-20 14:07 readahead
-rw-r--r-- 1 root root 1484 2008-11-05 03:22 request-key.conf
drwxr-xr-x 3 root root 30 2009-04-20 14:03 resolvconf
-rw-r--r-- 1 root root 77 2011-04-07 20:28 resolv.conf
-rwxr-xr-x 1 root root 268 2008-05-03 07:40 rmt
-rw-r--r-- 1 root root 887 2009-03-05 15:06 rpc
drwxr-xr-x 2 root root 41 2009-04-20 14:07 samba
drwxr-xr-x 3 root root 1143 2009-04-20 14:07 sane.d
drwxr-xr-x 2 root root 34 2009-04-20 14:09 scim
-rw-r--r-- 1 root root 3663 2009-02-11 12:17 screenrc
-rw-r--r-- 1 root root 666 2009-04-09 00:19 scsi_id.config
-rw-r--r-- 1 root root 1347 2009-04-04 05:49 securetty
drwxr-xr-x 2 root root 158 2009-04-20 13:59 security
-rw-r--r-- 1 root root 85602 2008-07-04 08:09 sensors.conf
-rw-r--r-- 1 root root 18480 2009-03-05 15:06 services
drwxr-xr-x 3 root root 199 2009-04-20 14:05 sgml
-rw-r----- 1 root shadow 861 2011-04-07 20:24 shadow
-rw------- 1 root root 849 2011-04-07 20:24 shadow-
-rw-r--r-- 1 root root 181 2009-04-20 14:07 shells
drwxr-xr-x 2 root root 75 2009-04-20 14:07 skel
drwxr-xr-x 3 root root 23 2009-04-20 14:01 sound
drwxr-xr-x 2 root root 38 2009-04-20 14:06 ssh
drwxr-xr-x 4 root root 68 2009-04-20 13:59 ssl
-r--r----- 1 root root 567 2011-04-07 20:24 sudoers
-rw-r--r-- 1 root root 2277 2009-03-18 22:17 sysctl.conf
drwxr-xr-x 2 root root 81 2009-04-20 13:59 sysctl.d
-rw-r--r-- 1 root root 1626 2009-01-23 18:33 syslog.conf
drwxr-xr-x 2 root root 23 2009-04-20 13:59 terminfo
-rw-r--r-- 1 root root 8 2009-04-20 13:59 timezone
-rw-r--r-- 1 root root 645 2008-11-18 23:42 ts.conf
-rw-r--r-- 1 root root 1260 2008-05-30 06:22 ucf.conf
drwxr-xr-x 3 root root 47 2009-04-20 14:00 udev
drwxr-xr-x 3 root root 146 2009-04-20 14:06 ufw
-rw-r--r-- 1 root root 248 2008-11-04 21:37 updatedb.conf
drwxr-xr-x 3 root root 82 2009-04-20 14:06 update-manager
drwxr-xr-x 6 root root 113 2009-04-20 14:04 update-motd.d
drwxr-xr-x 2 root root 3 2009-03-27 08:42 update-notifier
-rw-r--r-- 1 root root 97 2009-04-20 14:08 usplash.conf
drwxr-xr-x 2 root root 37 2009-04-20 14:00 vim
drwxr-xr-x 2 root root 35 2009-04-20 14:06 w3m
-rw-r--r-- 1 root root 4221 2008-11-11 13:21 wgetrc
-rw-r--r-- 1 root root 1343 2007-01-09 18:39 wodim.conf
drwxr-xr-x 2 root root 63 2009-04-20 14:07 wpa_supplicant
drwxr-xr-x 9 root root 80 2011-04-07 20:24 X11
drwxr-xr-x 5 root root 98 2009-04-20 14:08 xdg
drwxr-xr-x 2 root root 184 2009-04-20 14:05 xml
drwxr-xr-x 2 root root 35 2009-04-20 14:06 xulrunner-1.9
-rw-r--r-- 1 root root 461 2009-04-17 08:29 zsh_command_not_found
root@ubuntu:/etc# cd
root@ubuntu:~# ls
root@ubuntu:~# cd /home
root@ubuntu:/home# ls
ubuntu
root@ubuntu:/home# cd /home/ubuntu/
root@ubuntu:/home/ubuntu# ls
Desktop Documentos Imágenes Música Plantillas Público tareas varEntorno Vídeos
root@ubuntu:/home/ubuntu# cd tareas
root@ubuntu:/home/ubuntu/tareas# touch archivosEtc
root@ubuntu:/home/ubuntu/tareas# ls
archivosEtc fechayhora mipasswd modulosypci resumenMod resumenPci varEntorno
root@ubuntu:/home/ubuntu/tareas# vi archivosEtc
//pegar
//escape :x enter
Otorgar permisos de lectura solo al usuario y rechazar todos los permisos al grupo y otros al
archivo fechayhora.txt
root@ubuntu:/home/ubuntu/tareas# ls
archivosEtc fechayhora fechayhoraEtc fechayhoramasEtc mipasswd modulosypci
resumenMod resumenPci varEntorno
root@ubuntu:/home/ubuntu/tareas# chmod 100 fechayhora
root@ubuntu:/home/ubuntu/tareas# ls -l
total 72
-rw-r--r-- 1 root root 13072 2011-04-08 00:30 archivosEtc
---x------ 1 ubuntu ubuntu 51 2011-04-08 00:09 fechayhora
-rw-r--r-- 1 root root 13123 2011-04-08 00:31 fechayhoraEtc
-rw-r--r-- 1 root root 0 2011-04-08 00:30 fechayhoramasEtc
-rw-r--r-- 1 ubuntu ubuntu 0 2011-04-07 23:50 mipasswd
-rw-r--r-- 1 ubuntu ubuntu 5651 2011-04-07 23:47 modulosypci
-rw-r--r-- 1 ubuntu ubuntu 3451 2011-04-07 23:42 resumenMod
-rw-r--r-- 1 ubuntu ubuntu 2200 2011-04-07 23:45 resumenPci
-rw-r--r-- 1 ubuntu ubuntu 2268 2011-04-07 23:57 varEntorno