User talk:Axes orios

/ slash \ back slash ' ' quotes "" doble quotes
 * 1) pound
 * colon

. dot .. doble dot $ dolar _underscore % porcent - minus, dash parentesis [] brackets {} braces ^ cap > less than < greater than & amperson ~ tild !# como se llama (es la primera linea de cada script)
 * semi colon
 * pipe

estudiar ls -ltr touch awk vi scriptings

inicio de archivos en unix

c b l (links :soft link / hard link) s (stack files)

user - group - other rwx   r_x	_wx 7     5	  3 r - 4 w - 2 x - 1

-rwxrw-r--   10    root   root 2048    Jan 13 07:11 afile.exe ?OOOGGGWWWS  00  UUUUUU GGGGGG ####    ^-- last modification date stamp and file name are obvious ;-) ^ ^  ^  ^ ^    ^      ^      ^    ^ \- File type flag
 * | |  | |    |      |      |    \--- File Size
 * | |  | |    |      |      \ Group Name (for example, Users, Adminstrators, etc)
 * | |  | |    |      \--- Owner Acct
 * | |  | |    \-- Link count (what constitutes a "link" here varies)
 * | |  | \--- Alternate Access (blank means none defined, anything else varies)
 * \--\--\- Read, Write and Special access modes for [O]wner, [G]roup, and [W]orld (everyone else)



du - h (disk usage) df

rm -ef (never use it)

unix commands to

http://superuser.com/questions/204564/how-can-i-find-files-that-are-bigger-smaller-than-x-bytes

search a files created one month before which size will be greater than a 1mb

find files one month older   http://www.unix.com/unix-for-advanced-and-expert-users/162080-find-files-older-than-30-days-old.html

find files from an specific day  [ find. -type f -newermt 2015-05-07 ! -newermt 2015-05-08 ]

scrip

user: 1047816

1 #!/bin/bash 2 # Bash Menu Script 3 #col_name=`echo "\033[33m"` #yellow 4 #col_dflt=`echo "\037[37m"` #white 5 echo -e '\e[1;32m My first name: Ignacio \e[0m' 6 echo -e '\e[0;36m Last name   :  Guevara \e[0m'

---

training2@training2-HP-Server:~/1047816$ cat read_numsfile

var1=0; var2=0; for i in $(cat filenums.txt); do  if (( var1 == 0 )); then var1=$i else var2=$i fi done
 * 1) !/bin/bash
 * 1) echo "for $i"

num1=$var1 num2=$var2

if ((num1 > num2)); then echo "Value $num1 is greater than $num2" else echo "Second input value of $num2 is greater than $num1" fi training2@training2-HP-Server:~/1047816$

---

training2@training2-HP-Server:~/1047816$ cat read_nums_param echo "Params: $#" if (($# != 2 )); then echo "Please pass 2 parameters" exit; fi
 * 1) !/bin/bash

if $1 =~ [^[:digit: ]]; then echo "Only numbers please" exit; else if $2 =~ [^[:digit: ]]; then echo "Second parameter is not a valid number" else echo -e 'Parameter 1:\e[1;32m '$1 ' \e[0m' echo -e 'Parameter 2:\e[1;32m '$2 ' \e[0m' if (( $1 > $2 )); then echo "Value $1 is greater than $2" else echo "Second input is greater than $2" fi  fi fi