Shell Basics Workshop Report n. 2/3 Juli 2010

>> nerdcafe Vetomat 19.7.2010        snufu/fuzzy speach, Zbog report
SHELL BASICS N°2

[c]$ nmap 192.168.1.0[/c]

scan the local subnet to check for available hosts – nmap returns all IPs of running machines in the specified subnet. 192.168.1.0-100 scans IPs 1-100.

(you ll need to apt-get install nmap)

[c]$ uptime[/c]

Shows when the pc started; how many users; load average; how many processes are running

[c]$ date[/c]

gives you back a date and time

[c]$ ncal[/c]

to call the calendar

[c]#[/c]

Comment sign
to insert a not exacutable text, frequently used for human comunication instead of the normal typing in the terminal that is readed by default as a command to the computer

[c]*[/c]

is a jolly to ask for existing files/Directory for example

[c]$ echo D*[/c]

gave:
Desktop Dokumente…
(every file with the D as first letter in the directory where we are located)

[c]?
$ fsdsf?[/c]

if you dont remember the last letter of a data
for example fsdfz
the command returns the possible files you are searching
like the asterisc but applies only on the last letter in doubt

[c]$[/c]

the dollar $ itself
means a variable

[c]|[/c]

the pipeline | between commands is to add multiple commands without writing multiple lines in the terminal

[c]""[/c]

are to consider the string as text

[c]$ rm filename[/c]

removes files – take care there is no restore the file will be deleted!

[c]$ clear[/c]

clean the monitor terminal from previous output lines

[c]$ iwlist wlan0 scan[/c]

scan for avalaible networks with network interface wlan0 (the 1. wlan card,usually)

[c]$ ps[/c]

programs running by everybody

[c]$ ps aux[/c]

more info about the running programs

[c]$ ps aux | less[/c]

pipe the processes output into “less” – just for easy reading

[c]>[/c]

to redirect and copy the command output to another program

[c]>>[/c]

append
attach the output left of >> to the end of the file right off >>
for example

[c]$ echo hiho > foobar
$ cat echo >> foobar[/c]

will give as output
foobar

foobar

[c]<[/c]

[c]\[/c]

(escape) to take out special meaning and read the value as text
example echo “mb\”r*” gives the output
mb”r

true is 0
and frequently in programming it is the opposite: true is 1 !!

[c]$ wc[/c]

words count

[c]$ wc -l[/c]

wordcount –lines

Report of Linux-works shell meeting in Vetomat 19.Juli.2010