Shell Basics Workshop Report n. 3/3 Juli 2010

By , July 27, 2010 03:24

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

$ ncal -w

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

$ red

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

$ mcedit filename

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

$ mc

clone of an oldschool filemanager

—————————-

$ tput

initialize a terminal

$ reset

query terminfo database
(clear the complete terminal window)

————————–

$ cp "source" "destination"

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

$ mkdir "name"

make directory “name”

$ ls -l

list all the files and folders in the directory

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

$ ls -l "directory-name"

is giving the list of the called directory

$ pwd

Print Working Directory
shows the actual folder content

$ cd ..

go one level up

$ if cd /somewhere; then date;

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

$ echo mario > test/.secret

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

$ ls -a

to recall a hidden file in a list  -a

$ echo /.*

will call also all the hidden files

./

it represents the current directory

../

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

$ rm filename

remove file

$ rm /dir/

remove folder

$ rm -r foldername

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

$ set -x
$ set +x

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

$ echo foo | cat

“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

Comments are closed

WordPress Open Source Blog System
SynOptX Lab Theme