cnt voy

OCTOPUS engine | mechatronic | electronic | 3print | arduino | raspberry pi |

webové prezentace, databázové aplikace, elektronika, raspberry, PIC

home    tree    mail  l  English

L i n u x

whoami > @user

pwd > DIR

history | less / tail..

man COMM (manual)

COMM -h (help)

wc FILE

grep FILE

find DIR

wget http://sentu.cz/sh/hi.sh

chmod 775 DIR(pwd)/hi.sh (change mode)

dmesg (report sit.)

free (mem)

df / (space)

df -h (human)

du -sh /dir/

du -s * | sort -nr > $HOME/user_space_report.txt

ls

ls -lat (line all time)

cp soubor.txt soubor.zaloha1.txt

rm soubor.txt 

echo soubor.txt byl zalohovan a nasledne smaza


sudo apt-get install openssh-server

service ssh strat

/etc/init.d/ssh start

ssh-copy-id

ifconfig

ip a l

nmap (network mapper)

nmap - sn / -v -A

netstat -vat

 


sysv-rc-conf (start init)

tmux / alt+B / Create Next Prew % (hor) " (vert)

htop

iotop

iftop

lsusb


BASH

cesta=/home/
skupina=inf98
echo Seznam ucastniku ve skupine $skupina:
ls ${cesta}student/$skupina
echo -n Zadej svuj plat:
read plat
echo Nevypadas jako bys vydelaval $plat dolaru.
echo "V aktualnim adresari je `ls | wc -l` souboru"
A=7
[ "$A" -eq 7 ] && echo Cisla se rovnaji (ala IF)
case $1 in
     -r) parametry=$1
         echo Nastavil jsem parametr -r;;
  -v|-V) echo Parametry -v a -V zatim nic nedelaji;;
      *) echo Zadali jste neznamy parametr
         exit 1;;
esac
while [ logicky_vyraz ]   # while [ "$#" -ne 0 ]
do                        # do
  prikazy                 #  echo "parametr je $1"; shift
done                      # done
for i in 1 3 5 7
do
  echo $i
done
for i in `ls *.wav`
do
  echo $i
done
lame -h -b 192 $i ${HOME}/hudba/${i}.mp3

provede skript to, že všechny wav soubory z aktuálního adresáře zkomprimuje do formátu mp3 pomocí enkodéru lame a výsledné mp3 soubory uloží do adresáře hudba ve vašem domovském adresáři.

 

for i in `users`
do
  echo "Odhlas se, chci byt sam!"|write $i 2>/dev/null 
    && echo $i dostal zpravu || 
    echo zprava pro $i nemohla byt dorucena.
done
i=80
echo "Nemame kam spechat, pockame $i sekund"
while [ $i -gt 0 ]
do
  sleep 1s
  echo -n "."
  i=`expr $i - 1`
done
echo ""
echo "no tak budeme pokracovat, no."



Linux?

Linux was originally developed as a free operating system for personal computers based on the Intel x86 architecture, but has since been ported to more computer hardware platforms than any other operating system.

The development of Linux is one of the most prominent examples of free and open-source software collaboration. The underlying source code may be used, modified and distributed—commercially or non-commercially—by anyone under the terms of its respective licenses, such as the GNU General Public License. Typically, Linux is packaged in a form known as a Linux distribution (or distro for short) for both desktop and server use.

Distributions include the Linux kernel, supporting utilities and libraries, many of which are provided by the GNU Project, and usually a large amount of application software to fulfil the distribution's intended use.

(Wikipedia)



History and future

.:.

Debian (Raspbian) | Ubuntu | Mint)
.: