Shell Basics Workshop Report n. 3/3 Juli 2010

>> nerdcafe Vetomat 26.7.2010        snufu/fuzzy speach, Zbog report
SHELL BASICS N°3

[c]$ ncal -w[/c]

calendar for the current week (it shows the all month)

[c]$ red[/c]

open a (strange) text editor in the terminal to go out: q + enter

[c]$ mcedit filename[/c]

the famous midnight-command editor (apt-get install mc)

[c]$ mc[/c]

clone of an oldschool filemanager

—————————-

[c]$ tput[/c]

initialize a terminal

[c]$ reset[/c]

query terminfo database
(clear the complete terminal window)

————————–

[c]$ cp "source" "destination"[/c]

copy files in directory (is an automatic paste)
=======================================================================================

[c]$ mkdir "name"[/c]

make directory “name”

[c]$ ls -l[/c]

list all the files and folders in the directory

(-l)     use a long listing format
as the details mode in a location window

[c]$ ls -l "directory-name"[/c]

is giving the list of the called directory

[c]$ pwd[/c]

Print Working Directory
shows the actual folder content

[c]$ cd ..[/c]

go one level up

[c]$ if cd /somewhere; then date;[/c]

Only if there is cd folder called like so then show the date

[c]$ echo mario > test/.secret[/c]

with the point on the new name it will create a hidden file that is  normally not shown in the interface and  in the command ls

[c]$ ls -a[/c]

to recall a hidden file in a list  -a

[c]$ echo /.*[/c]

will call also all the hidden files

[c]./[/c]

it represents the current directory

[c]../[/c]

it represents the parent directory
—————————

[c]$ rm filename[/c]

remove file

[c]$ rm /dir/[/c]

remove folder

[c]$ rm -r foldername[/c]

empty the directory    (delete the files but keep the folder)
—————————-

[c]$ set -x[/c]

[c]$ set +x[/c]

set
start the behavior session
+
the commmand string is printed on screen before the execution

the command string session will not show anymore the command screen

[c]$ echo foo | cat[/c]

“pipe echo foo into cat” write the info foo into the file and show the content (cat)
the 2 commands are connected to eatch other and have the same content

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