Shell Basics Workshop Report n. 2/3 Juli 2010
>> nerdcafe Vetomat 19.7.2010 snufu/fuzzy speach, Zbog report
SHELL BASICS N°2
$ nmap 192.168.1.0
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)
$ uptime
Shows when the pc started; how many users; load average; how many processes are running
$ date
gives you back a date and time
$ ncal
to call the calendar
#
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
*
is a jolly to ask for existing files/Directory for example
$ echo D*
gave:
Desktop Dokumente…
(every file with the D as first letter in the directory where we are located)
? $ fsdsf?
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
$
the dollar $ itself
means a variable
|
the pipeline | between commands is to add multiple commands without writing multiple lines in the terminal
""
are to consider the string as text
$ rm filename
removes files – take care there is no restore the file will be deleted!
$ clear
clean the monitor terminal from previous output lines
$ iwlist wlan0 scan
scan for avalaible networks with network interface wlan0 (the 1. wlan card,usually)
$ ps
programs running by everybody
$ ps aux
more info about the running programs
$ ps aux | less
pipe the processes output into “less” – just for easy reading
>
to redirect and copy the command output to another program
>>
append
attach the output left of >> to the end of the file right off >>
for example
$ echo hiho > foobar $ cat echo >> foobar
will give as output
foobar
foobar
<
\
(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 !!
$ wc
words count
$ wc -l
wordcount –lines
Report of Linux-works shell meeting in Vetomat 19.Juli.2010