Menú

Mis comandos utiles

Los ultimos 10 comandos mas usados:

history | awk ‘{print $2}’ | sort | uniq -c | sort -rn | head -10

Anuncios

Pollo al verdeo – Mix de recetas

Ingredientes

1 Pollo

4 cebollas de verdeo

2 cebollas grandes

3 cucharadas de mostaza

1 vaso de vino blanco

2 cucharaditas de pimenton dulce

caldo de gallina c/n

harina para el pollo

4 dientes de ajo cortados en rodajas

Perejil

sal y pimienta c/n.

Acompañamiento sugerido

Papas 1kg.

Queso, jamon y manteca, cantidad necesaria.

Preparacion

Cortar el pollo en presas, pasarlo por harina, y sellarlo/dorarlo en una cacerola grande (tipo essen) con un poquito de aceite en el fondo.

Toda la preparacion se hace con la olla destapada.

Retirar el pollo y rehogar ahi mismo las cebollas cortadas en juliana (se pueden rociar con un poquito de azucar). Una vez que esten listas, agregar los ajos y las cebollas de verdeo (con parte verde incluida) cortados en rodajas. Agregar el vino y dejar que evapore el alcohol.

Agregar el pollo y cubrir con el caldo. Luego de 10′ agregar la mostaza. Dejar que reduza hasta que el liquido quede bastante espeso. Una vez que haya pasado esto y el pollo este cocido, apagar la hornalla y agregar el perejil. Tapar y dejar descansar 5′ antes de servir.

Para el acompañamiento, hervir las papas en abundante agua con un chorrito de vinagre hasta que esten casi cocidas (que les falten no mas de 2′ para estar listas).

Saltarlas en una sarten con manteca, jamon y queso muzzarella, hasta que esten doradas.

Hacer Root el Galaxy Tab 3


Requisitos

1.- Activar modo depuración usb en la tablet.

2.- Activar Fuentes desconocidas en la tablet.

3.- Opcional subir a 10 minutos tiempo de apagado de pantalla.

4.- Bajar el programa de acá: http://www.kingoapp.com/android-root.htm

5.- Instalarlo al pc.

6.- Conectar la tablet prendida al pc.

7.- Correr el programa KINGO, esperar a que reconozca la tablet, y darle a ROOT, esperar un poco, deben estar conectados a WIFI pues descarga unos archivos al parecer, luego el mismo programa te avisa el root logrado, la tablet se reinicia con acceso a root a través de la apk SuperSU.

8.-Esperar a que reinicie y dar permisos al superSu

Esta es la forma mas Fácil de conseguir ser Root en la Tablet la otra forma es un poco mas complicada solo un poco.

Tarta de Champignones y Cheddar

Ingredientes

 

  • Para la masa
  • 300 g de harina
  • 150 g de manteca
  • 1 pizca de salagua
  • Para el relleno
  • 4 huevos
  • 1 yema
  • 100 cc de crema de leche
  • 400 g de champiñones
  • 200 g de queso Cheddar
  • 1 ramito de ciboulette
  • 1 pizca de nuez moscada
  • aceite de oliva para saltear
  • sal y pimienta
  • Preparación

     

    • Hacé la masa arenando la manteca fría con los secos; tomala con un chorrito de agua helada, formá el bollo y reservalo 1/2 hora en la heladera.
    • Estirá la masa, forrá una tartera desmotable de 26 cm y llevá de nuevo a la heladera.
    • Batí apenas los huevos con la yema, la crema, nuez moscada, sal y pimienta.
    • Cortá los champiñones en láminas y saltealos en el aceite.
    • Acomodá sobre la masa el queso cortado en cubitos y encima los champiñones; espolvoreá con la ciboulette picada y cubrí todo con la mezcla de huevos.
    • Cociná en horno precalentado moderado 30 minutos, y serví tibiao fría.

    Albondiguitas

    Ingredientes

    500 g de carne picada
    2 tajadas de pan lactal
    leche, c/n
    1/2 cebolla
    2 huevos
    1 cda. de perejil
    2 cdas. de queso rallado
    sal, pimienta y nuez moscada, a gusto

    Preparación

     

    • Colocar la carne en un bol, agregarle la miga de pan sin su corteza, previamente remojada en leche y exprimida, la cebolla picada y rehogada en aceite, los huevos, el perejil picado, el queso, la sal, pimienta y nuez moscada.
    • Mezclar bien con las manos con guantes hasta que todos los ingredientes se unan.
    • Para hacer las albondiguitas, poner un poco de harina en una taza o en un vaso; tomar porciones de carne con la ayuda de una cuchara mediana; volcarlas en el recipiente y sacudir para formar bolitas de 5 cm de diámetro.
    • Luego insertar tres o cuatro de ellas en palillos de brochette, disponerlas en una asadera apenas aceitada, rociar la carne con otro poco de aceite y llevar a horno precalentado moderado por 20 minutos, rotando las brochettes de tanto en tanto para que se cocinen parejo.

    Pan de salvado de trigo ACTUALIZACIÓN

    ACTUALIZACIÓN

    A las recetas anteriores, le sumamos la foto y medidas para la UNO que compartiera Juan Carlos Beliera.

    Ahora que estoy con unos kilos de más, empezaré a probar con los panes con semillas y de salvado. Esta fue mi vez primera con el pan de salvado de trigo y debo decir que salió con todo éxito: suave, esponjoso y muy rico.

    Prueban y me cuentan!

     

    Preparación:

    1- Desconectar el horno y rellenar la cubeta, en el orden estipulado, los Ingredientes Base.

    2- Enchufar y poner la Moulinex en Programa correspondiente. Todas nuestra recetas las hacemos pensando en un kilo, selecciones el peso a un kilo y a dorado claro.

    3- Al finalizar la cocción, la máquina emitirá nuevamente una señal sonora. Desconectar y retirar la cubeta.

    5- Desmoldar y dejar enfriar sobre una rejilla, para que el aire fresco seque la humedad de abajo del pan. Recuerde quitarle los mezcladores amasadores con el gancho!

    Modelo OW2000 OW3000 OW5000 OW5003 UNO
    Volumen 1 kg 1 kg 1 kg 1 kg 1 kg
    Programa 4 3 3 3 4
    tiempo 3h 45m 3h 42m 3h 42m 3h 42m 3h 26m #
    agua 370 ml 370 ml 370 ml 370 ml 370 ml
    manteca 30 g 30 g 30 g 30 g 30 g
    Sal 3 cc 3 cc 3 cc 3 cc 3 cc
    azúcar 3 cs 3 cs 3 cs 3 cs 3 cs
    Harina 0000 500 g 500 g 500 g 500 g 500 g
    salvado de trigo 100 g 100 g 100 g 100 g 100 g
    Levadura polvo 3,5 cc 3,5 cc 3,5 cc 3,5 cc 3,5 cc

    # A la UNO se le debe adicionar 10 minutos más con orneado del programa 11

    Linux Commands In Structured Order with Detailed Reference

    (http://linoxide.com/guide/linux-command-shelf.html)

    Linux command shelf is a quick reference guide for all linux user who wish to learn linux commands. Commands are divided into 15 categories , which would be more easier to understand what commands to be used in specific requirement. The pdf format of linux command shelf is also available. You could reach Bobbin Zachariah the author of this guide for any comments or corrections.

    You can download the latest version of linux command shelf in pdf format. Current linux command shelf version is 1.1. This guide can be used by both advanaced and new linux users , provided the best efforts to give most relevant linux commands.

    You can navigate to each section using the index that is places on the right hand side of this page or just below. If you feel hard to understand any command please let me know on my above profile page.
    – See more at: http://linoxide.com/guide/linux-command-shelf.html#sthash.fwTWJuYG.dpuf

     

    1. SYSTEM

    $ uname –a                       => Display linux system information
    $ uname –r                       => Display kernel release information (refer uname command in detail)
    $ cat /etc/redhat_release        => Show which version of redhat installed 
    $ uptime                         => Show how long system running + load (learn uptime command)
    $ hostname                       => Show system host name
    $ hostname -i                    => Display the IP address of the host (all options hostname)
    $ last reboot                    => Show system reboot history (more examples last command)
    $ date                           => Show the current date and time (options of date command)
    $ cal                            => Show this month calendar (what more in cal)
    $ w                              => Display who is online (learn more about w command)
    $ whoami                         => Who you are logged in as (example + sreenshots)
    $ finger user                    => Display information about user (many options of finger command)

    2. Hardware

    $ dmesg                          => Detected hardware and boot messages (dmesg many more options)
    $ cat /proc/cpuinfo              => CPU model
    $ cat /proc/meminfo              => Hardware memory
    $ cat /proc/interrupts           => Lists the number of interrupts per CPU per I/O device
    $ lshw                           => Displays information on hardware configuration of the system
    $ lsblk                          => Displays block device related information in Linux (sudo yum install util-linux-ng)
    $ free -m                        => Used and free memory (-m for MB) (free command in detail)
    $ lspci -tv                      => Show PCI devices (very useful to find vendor ids)
    $ lsusb -tv                      => Show USB devices (read more lsusb options)
    $ lshal                          => Show a list of all devices with their properties 
    $ dmidecode                      => Show hardware info from the BIOS (vendor details)
    $ hdparm -i /dev/sda	          # Show info about disk sda 
    $ hdparm -tT /dev/sda	         # Do a read speed test on disk sda
    $ badblocks -s /dev/sda	         # Test for unreadable blocks on disk sda

    3. Statistics

    $ top                              => Display and update the top cpu processes (30 example options)
    $ mpstat 1                         => Display processors related statistics (learn mpstat command)
    $ vmstat 2                         => Display virtual memory statistics (very useful performance tool)
    $ iostat 2                         => Display I/O statistics (2sec Intervals) (more examples)
    $ tail -n 500 /var/log/messages    => Last 10 kernel/syslog messages (everyday use tail options)
    $ tcpdump -i eth1                  => Capture all packets flows on interface eth1 (useful to sort network issue)
    $ tcpdump -i eth0 'port 80'        => Monitor all traffic on port 80 ( HTTP )
    $ lsof                             => List all open files belonging to all active processes.(sysadmin favorite command)
    $ lsof -u testuser                 => List files opened by specific user
    $ free –m                          => Show amount of RAM (daily usage command)
    $ watch df –h                      => Watch changeable data continuously(interesting linux command)
    
    

    4. Users

    $ id                                  => Show the active user id with login and group(with screenshot)
    $ last                                => Show last logins on the system (few more examples)
    $ who                                 => Show who is logged on the system(real user who logged in)
    $ groupadd   admin                    => Add group "admin" (force add existing group)
    $ useradd -c  "Sam Tomshi" -g admin -m sam  => Create user "sam" and add to group "admin"(here read all parameter)
    $ userdel sam                         => Delete user sam (force,file removal)
    $ adduser sam                         => Add user "sam" 
    $ usermod                             => Modify user information(mostly useful for linux system admins)
    
    

    5. File Commands

    $ ls –al                                => Display all information about files/ directories(20 examples)
    $ pwd                                   => Show current directory path(simple but need every day)
    $ mkdir directory-name                  => Create a directory(create mutiple directory)
    $ rm file-name                          => Delete file(be careful of using rm command)
    $ rm -r directory-name                  => Delete directory recursively 
    $ rm -f file-name                       => Forcefully  remove file
    $ rm -rf directory-name                 => Forcefully remove directory recursively
    $ cp file1 file2                        => Copy file1 to file2 (15 cd command examples)
    $ cp -r dir1 dir2                       => Copy dir1 to dir2, create dir2 if it doesn’t  exist
    $ mv file1 file2                        => Move files from one place to another(with 10 examples)
    $ ln –s  /path/to/file-name  link-name  => Create symbolic link to file-name (examples)
    $ touch file                            => Create or update file (timestamp change)
    $ cat > file                            => Place standard input into file (15 cat command examples)
    $ more file                             => Output the contents of file (help display long tail files)
    $ head file                             => Output the first 10 lines of file (with different parameters)
    $ tail file                             => Output the last 10 lines of file (detailed article with tail options)
    $ tail -f file                          => Output the contents of file as it grows starting with the last 10 lines
    $ gpg -c file                           => Encrypt file (how to use gpg)
    $ gpg file.gpg                          => Decrypt file
    
    

    6. Process Related

    $ ps                               # Display your currently active processes (many parameters to learn)
    $ ps aux | grep 'telnet'           # Find all process id related to telnet process
    $ pmap                             # Memory map of process (kernel,user memory etc)
    $ top                              # Display all running processes (30 examples)
    $ kill pid                         # Kill process with mentioned pid id (types of signals)
    $ killall proc                     # Kill all processes named proc
    $ pkill processname                # Send signal to a process with its name
    $ bg                               # Resumes suspended jobs without bringing them to foreground (bg and fg command)
    $ fg                               # Brings the most recent job to foreground
    $ fg n                             # Brings job n to the foreground
    
    

    7. File Permission Related

    $ chmod octal file-name     # Change the permissions of file to octal , which can be found separately for user, group and world
    octal value  (more examples)
    4 - read
    2 – write
    1 – execute
    Example 
    $ chmod 777 /data/test.c                   # Set rwx permission for owner , rwx  permission for group, rwx permission for world
    $ chmod 755 /data/test.c                   # Set rwx permission for owner,rx for group and world
    $ chown owner-user file                    # Change owner of the file (chown more examples)
    $ chown owner-user:owner-group  file-name  # Change owner and group owner of the file
    $ chown owner-user:owner-group directory   # Change owner and group owner of the directory
    Example 
    $ chown bobbin:linoxide test.txt
    $ ls -l test.txt
    -rw-r--r-- 1 bobbin linoxide 0 Mar 04 08:56 test.txt
    
    
    

    8. Network

    $ ifconfig –a                  # Display all network ports and ip address (set mtu and other all options,ifconfig now in deprecated network command)
    $ ifconfig eth0                # Display specific  ethernet port ip address and details
    $ ip addr show                 # Display all network interfaces and ip address(available in iproute2 package,powerful than ifconfig)
    $ ip address add 192.168.0.1 dev eth0      # Set ip address
    $ ethtool eth0                 # Linux tool to show ethernet status (set full duplex , pause parameter)
    $ mii-tool  eth0               # Linux tool to show  ethernet status (more or like ethtool)
    $ ping host                    # Send echo request to test connection (learn sing enhanced ping tool)
    $ whois domain                 # Get who is information for domain
    $ dig domain                   # Get DNS information for domain (screenshots with other available parameters)
    $ dig  -x host                 # Reverse lookup host 
    $ host google.com              # Lookup DNS ip address for the name (8 examples of host command)
    $ hostname –i                  # Lookup local ip address (set hostname too)
    $ wget file                    # Download file (very useful other option)
    $ netstat  -tupl               # Listing all active listening ports(tcp,udp,pid) (13 examples)
    
    

    9. Compression / Archives

    $ tar cf home.tar  home              # Create tar named home.tar containing home/ (11 tar examples)
    $ tar xf file.tar                    # Extract the files from file.tar
    $ tar czf  file.tar.gz  files        # Create a tar with gzip compression
    $ gzip file                          # Compress file and renames it to file.gz (untar gzip file)
    
    

    10. Install Package

    $ rpm -i pkgname.rpm                         # Install rpm based package (Installing, Uninstalling, Updating, Querying ,Verifying)
    $ rpm -e pkgname                             # Remove package
    Install from source
    ./configure
    make
    make install (what it is)
    
    

    12. Login (ssh and telnet)

    $ ssh user@host                         # Connect to host as user (secure data communication command)
    $ ssh  -p port user@host                # Connect to host using specific port
    $ telnet host                           # Connect to the system using  telnet port
    
    

    13. File Transfer

    scp
    $ scp file.txt   server2:/tmp                   # Secure copy file.txt to remote host  /tmp folder
    $ scp nixsavy@server2:/www/*.html   /www/tmp    # Copy *.html files from remote host to current system /www/tmp folder
    $ scp -r nixsavy@server2:/www   /www/tmp        # Copy all files and folders recursively from remote server to the current system /www/tmp folder
    rsync
    $ rsync -a /home/apps /backup/                  # Synchronize source to destination
    $ rsync -avz /home/apps linoxide@192.168.10.1:/backup    # Synchronize files/directories between the local and remote system with compression enabled
    
    

    14. Disk Usage

    $ df –h                         # Show free space on mounted filesystems(commonly used command)
    $ df -i	                        # Show free inodes on mounted filesystems
    $ fdisk -l	                # Show disks partitions sizes and types(fdisk command output)
    $ du -ah                        # Display disk usage in human readable form (command variations)
    $ du -sh                        # Display total disk usage on the current directory
    $ findmnt                        # Displays target mount point for all filesystem (refer type,list,evaluate output)
    $ mount device-path mount-point  # Mount a device 
    

    15. Directory Traverse

    $ cd ..                              # To go up one level of the directory tree(simple & most needed)
    $ cd	                             # Go to $HOME directory
    $ cd /test                           # Change to /test directory
    
    

    Curry de Cerdo

    Ingredientes

    1 kg de bondiola de cerdo
    1 kg de cebollas
    2 cditas. de jengibre fresco
    2 cditas. de comino en granos
    2 cditas. de cayena en granos
    1 rama de canela
    10 clavos de olor
    1 cdita. de cúrcuma
    3 cdas. de aceite
    caldo, c/n
    500 g de papas
    sal y pimienta, a gusto

    Preparación

     

    • Cortar la carne de cerdo en cubos y ponerla en un bol junto con las cebollas picadas, el jengibre rallado, el comino y la cayena previamente tostados y machacados; el resto de los condimentos; y dejar marinar tapado y en la heladera por toda una noche.
    • Al día siguiente, en una sartén saltear la carne en un poco de aceite y cuando quede dorada bajar la llama, cubrir el fondo de la sartén con caldo y dejar cocinar media hora, incorporando más líquido conforme la preparación se vaya secando.
    • Agregar las papas peladas y cortadas en cubos de 3 cm de lado, agregar más caldo y cocinar todo junto otra media hora o hasta que las papas estén hechas.
    • Salpimentar y servir caliente en plato hondo rociado con el fondo de cocción.

    Sorrentinos

    Ingredientes

    Para la masa
    250 grs de harina
    2 cdas de aceite
    1 cdita de sal
    1 taza de agua

    Para el relleno
    50 grs de jamón cocido
    300 grs de queso mantecoso
    1 huevo
    sal y pimienta, c/n
    nuez moscada, a gusto

    Preparación

     

    • Para la masa, poner el harina junto con la sal en un bol y en el centro volcar el aceite y el agua hirviendo de golpe.
    • Mezclar rápidamente y sobre la mesa, amasar hasta obtener un bollo tierno y liso.
    • Dejar descansar 30 minutos.
    • Para el relleno, mezclar el jamón picado con el queso cortado en cubos pequeños y el huevo; condimentar y reservar.
    • Para el armado, estirar una tira en forma rectangular de masa lo más fina posible sobre una mesada enharinada.
    • Distribuir el relleno en montoncitos espaciados entre sí; tapar con otra capa de masa y con un pocillo de café o un cortapasta, presionar sobre los montoncitos para cortar los sorrentinos, cuidando que los bordes queden unidos.
    • Volcarlos por tandas en agua hirviendo con sal, y cuando floten en la superficie, retirar y servir con salsa de tomates y perejil picado.

    3 Steps to Perform SSH Login Without Password Using ssh-keygen & ssh-copy-id

    (http://www.thegeekstuff.com/2008/11/3-steps-to-perform-ssh-login-without-password-using-ssh-keygen-ssh-copy-id/)

     

    You can login to a remote Linux server without entering password in 3 simple steps using ssky-keygen and ssh-copy-id as explained in this article.

    ssh-keygen creates the public and private keys. ssh-copy-id copies the local-host’s public key to the remote-host’s authorized_keys file. ssh-copy-id also assigns proper permission to the remote-host’s home, ~/.ssh, and ~/.ssh/authorized_keys.

    This article also explains 3 minor annoyances of using ssh-copy-id and how to use ssh-copy-id along with ssh-agent.

    Step 1: Create public and private keys using ssh-key-gen on local-host

    jsmith@local-host$ [Note: You are on local-host here]
    
    jsmith@local-host$ ssh-keygen
    Generating public/private rsa key pair.
    Enter file in which to save the key (/home/jsmith/.ssh/id_rsa):[Enter key]
    Enter passphrase (empty for no passphrase): [Press enter key]
    Enter same passphrase again: [Pess enter key]
    Your identification has been saved in /home/jsmith/.ssh/id_rsa.
    Your public key has been saved in /home/jsmith/.ssh/id_rsa.pub.
    The key fingerprint is:
    33:b3:fe:af:95:95:18:11:31:d5:de:96:2f:f2:35:f9 jsmith@local-host

    Step 2: Copy the public key to remote-host using ssh-copy-id

    jsmith@local-host$ ssh-copy-id -i ~/.ssh/id_rsa.pub remote-host
    jsmith@remote-host's password:
    Now try logging into the machine, with "ssh 'remote-host'", and check in:
    
    .ssh/authorized_keys
    
    to make sure we haven't added extra keys that you weren't expecting.

    Note: ssh-copy-id appends the keys to the remote-host’s .ssh/authorized_key.

    Step 3: Login to remote-host without entering the password

    jsmith@local-host$ ssh remote-host
    Last login: Sun Nov 16 17:22:33 2008 from 192.168.1.2
    [Note: SSH did not ask for password.]
    
    jsmith@remote-host$ [Note: You are on remote-host here]


    The above 3 simple steps should get the job done in most cases.

    We also discussed earlier in detail about performing SSH and SCP from openSSH to openSSH without entering password.

    If you are using SSH2, we discussed earlier about performing SSH and SCP without password from SSH2 to SSH2 , from OpenSSH to SSH2 and from SSH2 to OpenSSH.

    Using ssh-copy-id along with the ssh-add/ssh-agent

    When no value is passed for the option -i and If ~/.ssh/identity.pub is not available, ssh-copy-id will display the following error message.

    jsmith@local-host$ ssh-copy-id -i remote-host
    /usr/bin/ssh-copy-id: ERROR: No identities found


    If you have loaded keys to the ssh-agent using the ssh-add, then ssh-copy-id will get the keys from the ssh-agent to copy to the remote-host. i.e, it copies the keys provided by ssh-add -L command to the remote-host, when you don’t pass option -i to the ssh-copy-id.

    jsmith@local-host$ ssh-agent $SHELL
    
    jsmith@local-host$ ssh-add -L
    The agent has no identities.
    
    jsmith@local-host$ ssh-add
    Identity added: /home/jsmith/.ssh/id_rsa (/home/jsmith/.ssh/id_rsa)
    
    jsmith@local-host$ ssh-add -L
    ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAsJIEILxftj8aSxMa3d8t6JvM79DyBV
    aHrtPhTYpq7kIEMUNzApnyxsHpH1tQ/Ow== /home/jsmith/.ssh/id_rsa
    
    jsmith@local-host$ ssh-copy-id -i remote-host
    jsmith@remote-host's password:
    Now try logging into the machine, with "ssh 'remote-host'", and check in:
    
    .ssh/authorized_keys
    
    to make sure we haven't added extra keys that you weren't expecting.
    [Note: This has added the key displayed by ssh-add -L]

    Three Minor Annoyances of ssh-copy-id

    Following are few minor annoyances of the ssh-copy-id.

    1. Default public key: ssh-copy-id uses ~/.ssh/identity.pub as the default public key file (i.e when no value is passed to option -i). Instead, I wish it uses id_dsa.pub, or id_rsa.pub, or identity.pub as default keys. i.e If any one of them exist, it should copy that to the remote-host. If two or three of them exist, it should copy identity.pub as default.
    2. The agent has no identities: When the ssh-agent is running and the ssh-add -L returns “The agent has no identities” (i.e no keys are added to the ssh-agent), the ssh-copy-id will still copy the message “The agent has no identities” to the remote-host’s authorized_keys entry.
    3. Duplicate entry in authorized_keys: I wish ssh-copy-id validates duplicate entry on the remote-host’s authorized_keys. If you execute ssh-copy-id multiple times on the local-host, it will keep appending the same key on the remote-host’s authorized_keys file without checking for duplicates. Even with duplicate entries everything works as expected. But, I would like to have my authorized_keys file clutter free.