LABORATORY OF "PROGRAMMING” • Operating system Linux ...

34 downloads 78 Views 15KB Size Report
LABORATORY OF "PROGRAMMING”. • Operating system Linux Ubuntu. Use menu "Aplicaciones/Accesorios/Terminal" to activate the command terminal of ...
LABORATORY OF "PROGRAMMING” • • •

Operating system Linux Ubuntu. Use menu "Aplicaciones/Accesorios/Terminal" to activate the command terminal of Linux (prompt $). Use programme "Navegador de Archivos" to copy files from or to the pen-drive. To finish, erase from the hard disc the files created (Linux command $rm *) and click on the en switch-off button (right upper corner). BASIC COMMANDS OF LINUX Commands

Description

Examples

vi gedit gcc ./ cat cd nom_directory clear cp file1 file2 date echo message find / -name nom -print grep 'string' archive head -number nom_archive ls ls -la ls -la | more man mkdir nom_directory more nom_file mv [path1]file1 [path2]file2 nl nom_file pwd rm archive rmdir nom_directory tail -number nom_archive

Universal text editor of Unix/Linux Text editor of Linux Ubuntu Compilator of Linux C To execute a compiled programme Shows the content of a file Changes directory Clears the screen Copies a file Shows the time and date of the computer Shows the message on the screen Finds the directory where a file is located Shows the lines of the archive that contain the chain Shows the first (number) lines of a file Lists the files of a directory Lists files including the system hidden ones Lists files in a paged mode Help manual about Linux commands Creates a directory Shows the content of a file in a paged mode Moves and/or renames a file Shows a file numbered in lines Shows the current directory name Deletes files Deletes a directory and the ones included in it Shows the last lines in an archive

. .. / * ? > file.txt CTRL + D CTRL + C

Indicates current directory Indicates directory previous to current one Indicates root directory Wildcard character: means any set of characters Wildcard character: means only one character Redirects the screen output towards a text file Keyboard End-of-File character (EOF) Stops the execution of the current programme

vi prog01.c gedit prog01.c gcc prog01.c –o prog01 ./prog01 cat data.txt cat data.txt |more cd mydata cd /home/mydata clear (CTRL + L) cp source1.c source2.c cp p1.c p3.c > nul date echo Welcome to Linux find / -name data.txt -print find / -name prog*.c grep "while" source.c head -20 data.txt head data.txt ls mydata ls /home/mydata ls –la mydata ls –la mydata | more man ls man vi mkdir ./mydata more data.txt mv source1.c ./mydata/ source1.c mv p1.c p3.c nl source1.c pwd rm data.txt rmdir mydata tail -20 data.txt tail data.txt ls ./mydata cd .. cd / *.txt data?.txt ls > file.txt find / -name prog*.c > file.txt

DOS Equivalent edit cl type cd cls copy, xcopy date echo

dir dir /p help md type |more move

del deltree . .. \ * ? CTRL + Z CTRL + C

Suggest Documents