jueves, 29 de mayo de 2014

7 Linux hwclock Command Examples to Set Hardware Clock Date Time

http://www.thegeekstuff.com/2013/08/hwclock-examples/
 
 

Chef Notes

Recipes and cookbooks

Cookbooks are another area in which Chef terminology gets flaky if in a different way. You may become confused about the difference between recipes and cookbooks.

Cookbooks are collections of recipes.


http://www.javahotchocolate.com/notes/chef-quick.html

Common Errors Chef

Your system clock has drifted from the actual time by more than 15 minutes. This can be fixed by syncing your clock with an NTP server. You'll need to rerun chef-client after synching NTP.

https://wiki.opscode.com/display/chef/Common+Errors

http://www.javahotchocolate.com/notes/chef-quick.html

http://www.javahotchocolate.com/notes/ntp.html

https://help.ubuntu.com/10.04/serverguide/NTP.html

miércoles, 2 de abril de 2014

Kernel 3.4 2014-03-31

  • Nouveau tendrá nuevo soporte para GPU’s recientes
  • Numerosas mejoras de rendimiento gráfico en los drivers Intel, a su vez se incluye el soporte para el audio Broadwell
  • Grandes cambios en los drivers gráficos VMware SVGA2
  • Soporte para Tegra PRIME de NVIDIA
  • Numerosas mejoras en los drivers libres de AMD Radeon, incluyendo el funcionamiento pleno de RadeonSI UVD
  • Soporte para el co-procesamiento criptografico de AMD
  • Se incluye un Boost genérico para la CPU
  • Mejoras en el rendimiento para el sistema de archivo flash F2FS
  • Se incluyen nuevas características y mejoras en el sistema de archivo Btrfs
  • Soporte para Xen PVH
  • Se añade la función SCHED_DEADLINE
  • Se actualizan BCache y blk-mq
  • Soporte para los mas recientes núcleos de procesadores llamados MIPS
  • Soporte para Xtensa SMP
  • Se añade la nueva característica de redes llamada TCP Auto Corking

lunes, 21 de octubre de 2013

Ruby - elementary OS

mati@laptop:~$ ruby -version
The program 'ruby' can be found in the following packages:
 * ruby1.8
 * ruby1.9.1
Try: sudo apt-get install <selected package>
 

mati@laptop:~$ gem -v
The program 'gem' can be found in the following packages:
 * ruby1.9.1
 * rubygems
Try: sudo apt-get install <selected package>
 

mati@laptop:~$

jueves, 26 de septiembre de 2013

LInux File Permissions

First digit in the above mode number is used to set setuid, setgid, or sticky bit. Each remain digit set permission for the owner, group, and world as follows:

    4 = r (Read)
    2 = w (Write)
    1 = x (eXecute)

So you end up creating the triplets for your user by adding above digits. For e.g.

    To represent rwx triplet use 4+2+1=7
    To represent rw- triplet use 4+2+0=6
    To represent r-- triplet use 4+0+0=4
    To represent r-x triplet use 4+0+1=5

To only give full permission to user, use it as follows:
chmod 0700 file.txt

    0 - Use set setuid, setgid, or sticky bit
    7 - Full permission for owner (rwx = 4+2+1=7)
    0 - Remove group permission (--- = 0+0+0=0)
    0 - Remove world permission (--- = 0+0+0=0)



http://www.cyberciti.biz/faq/unix-bsd-linux-setuid-file/

martes, 24 de septiembre de 2013

Standard Input, Output, And Error

1. Standard Output

To redirect standard output to another file besides the screen, we use the “>” redirection operator followed by
the name of the file.

[me@linuxbox ~]$ ls -l /usr/bin > ls-output.txt


2. Standard error

The answer is that the ls program does not send its error messages to standard output. Instead, like most well-written Unix programs, it sends its error messages to standard error.


[me@linuxbox ~]$ ls -l /bin/usr > ls-output.txt
ls: cannot access /bin/usr: No such file or directory

We received an error message. This makes sense since we specified the non-existent directory /bin/usr, but why was the error message displayed on the screen rather than being redirected to the file ls-output.txt? The answer is that the ls program does not send its error messages to standard output. Instead, like most well-written Unix
programs, it sends its error messages to standard error. Since we only redirected standard output and not standard error, the error message was still sent to the screen.


Redirecting Standard Error

Redirecting standard error lacks the ease of a dedicated redirection operator. To redirect standard error we must refer to its file descriptor. A program can produce output on any of several numbered file streams. While we have referred to the first three of these file streams as standard input, output and error, the shell references them internally as file descriptors zero, one and two, respectively. The shell provides a notation for redirecting files using the file descriptor number. Since standard error is the same as file descriptor
number two, we can redirect standard error with this notation:

[me@linuxbox ~]$ ls -l /bin/usr 2> ls-error.txt

The file descriptor “2” is placed immediately before the redirection operator to perform the redirection of standard error to the file ls-error.txt.

Redirecting Standard Output And Standard Error To One File

There are cases in which we may wish to capture all of the output of a command to a single file. To do this, we must redirect both standard output and standard error at the same time. There are two ways to do this. First, the traditional way, which works with old versions of the shell:

[me@linuxbox ~]$ ls -l /bin/usr > ls-output.txt 2>&1

Using this method, we perform two redirections. First we redirect standard output to the file ls-output.txt and then we redirect file descriptor two (standard error) to file descriptor one (standard output) using the notation 2>&1.