Differences

This shows you the differences between two versions of the page.

Link to this comparison view

uso:laboratoare:laborator-02:cheatsheet [2021/10/04 20:43]
127.0.0.1 external edit
uso:laboratoare:laborator-02:cheatsheet [2022/10/16 19:54] (current)
liza_elena.babu [Cale relativă și cale absolută]
Line 14: Line 14:
  
 <code bash> <code bash>
-student@uso:​~$ ls -l snap/spotify+student@uso:​~$ ls -l uso-lab/labs
-total 8 +(...)
-drwxr-xr-x 5 student student 4096 Oct  2 03:11 42 +
-drwxr-xr-x 3 student student 4096 Oct  2 03:10 common +
-lrwxrwxrwx 1 student student ​   2 Oct  2 03:10 current -> 42+
 </​code>​ </​code>​
 Cale absolută: Cale absolută:
  
 <code bash> <code bash>
-student@uso:​~$ ls -l /​home/​student/​snap/spotify +student@uso:​~$ ls -l /​home/​student/​uso-lab/​labs
-total 8 +(...)
-drwxr-xr-x 5 student student 4096 Oct  2 03:11 42 +
-drwxr-xr-x 3 student student 4096 Oct  2 03:10 common +
-lrwxrwxrwx 1 student student ​   2 Oct  2 03:10 current -> 42+
 </​code>​ </​code>​
 +
 ==== Schimbarea căii curente ==== ==== Schimbarea căii curente ====
  
Line 78: Line 73:
  
 <code bash> <code bash>
-student@uso:​~$ tree -L 1 /+student@uso:​~$ tree -F -L 1 /
 / /
-|-- bin +|-- bin/ 
-|-- boot +|-- boot/ 
-|-- dev +|-- dev/ 
-|-- etc +|-- etc/ 
-|-- home+|-- home/
 |-- initrd.img -> /​boot/​initrd.img-3.16.0-4-586 |-- initrd.img -> /​boot/​initrd.img-3.16.0-4-586
-|-- lib +|-- lib/ 
-|-- lib64 +|-- lib64/ 
-|-- libx32 +|-- libx32/ 
-|-- lost+found +|-- lost+found/ 
-|-- media +|-- media/ 
-|-- mnt +|-- mnt/ 
-|-- opt +|-- opt/ 
-|-- proc +|-- proc/ 
-|-- root +|-- root/ 
-|-- run +|-- run/ 
-|-- sbin +|-- sbin/ 
-|-- srv +|-- srv/ 
-|-- sys +|-- sys/ 
-|-- tmp +|-- tmp/ 
-|-- usr +|-- usr/ 
-|-- var+|-- var/
 ``-- vmlinuz -> boot/​vmlinuz-3.16.0-4-586 ``-- vmlinuz -> boot/​vmlinuz-3.16.0-4-586
 </​code>​ </​code>​
 +
 ==== Afișarea conținutului unui director ==== ==== Afișarea conținutului unui director ====
  
 <code bash> <code bash>
-student@uso:​~/​Avengers$ ls+student@uso:​~/uso_lab02/Avengers$ ls
 Captain America ​ Iron Man  Thor Captain America ​ Iron Man  Thor
 </​code>​ </​code>​
 <code bash> <code bash>
-student@uso:​~$ ls -l+student@uso:​~/uso_lab02$ ls -l
 (...) (...)
 -rw-rw-r-- 1 student student ​   0 Oct 13 13:02  cities -rw-rw-r-- 1 student student ​   0 Oct 13 13:02  cities
Line 119: Line 115:
 drwxr-xr-x 4 student student 4096 Oct  2 03:11  snap drwxr-xr-x 4 student student 4096 Oct  2 03:11  snap
 </​code>​ </​code>​
 +
 ==== Crearea fișierelor ==== ==== Crearea fișierelor ====
  
 <code bash> <code bash>
-student@uso:​~$ ls cities+student@uso:​~/uso_lab02$ ls cities
 ls: cannot access cities: No such file or directory ls: cannot access cities: No such file or directory
-student@uso:​~$ touch cities +student@uso:​~/uso_lab02$ touch cities 
-student@uso:​~$ ls cities+student@uso:​~/uso_lab02$ ls cities
 cities cities
 </​code>​ </​code>​
Line 131: Line 128:
  
 <code bash> <code bash>
-student@uso:​~$ mkdir GameOfThrones +student@uso:​~/uso_lab02$ mkdir GameOfThrones 
-student@uso:​~$ mkdir Avengers +student@uso:​~/uso_lab02$ mkdir Avengers 
-student@uso:​~$ ls -l+student@uso:​~/uso_lab02$ ls -l
 (...) (...)
 drwxr-xr-x 2 student student 4096 Sep 29 17:43 Avengers drwxr-xr-x 2 student student 4096 Sep 29 17:43 Avengers
Line 143: Line 140:
  
 <code bash> <code bash>
-student@uso:​~$ cat GameOfThrones/​Arya+student@uso:​~/uso_lab02$ cat GameOfThrones/​Arya
 A girl has no name A girl has no name
 </​code>​ </​code>​
Line 149: Line 146:
  
 <code bash> <code bash>
-student@uso:​~$ ls Avengers/+student@uso:​~/uso_lab02$ ls Avengers/
 Captain America ​ Hulk  Iron Man  Thor Captain America ​ Hulk  Iron Man  Thor
-student@uso:​~$ rm Avengers/​Hulk +student@uso:​~/uso_lab02$ rm Avengers/​Hulk 
-student@uso:​~$ ls Avengers/+student@uso:​~/uso_lab02$ ls Avengers/
 Captain America ​ Iron Man  Thor Captain America ​ Iron Man  Thor
 </​code>​ </​code>​
 +
 ==== Ștergerea directoarelor ==== ==== Ștergerea directoarelor ====
  
 <code bash> <code bash>
-student@uso:​~$ mkdir LordOfTheRings +student@uso:​~/uso_lab02$ mkdir LordOfTheRings 
-student@uso:​~$ ls -l+student@uso:​~/uso_lab02$ ls -l
 total 12 total 12
 drwxr-xr-x 2 student student 4096 Sep 29 18:02 Avengers drwxr-xr-x 2 student student 4096 Sep 29 18:02 Avengers
 drwxr-xr-x 2 student student 4096 Sep 29 17:44 GameOfThrones drwxr-xr-x 2 student student 4096 Sep 29 17:44 GameOfThrones
 drwxr-xr-x 2 student student 4096 Sep 29 18:09 LordOfTheRings drwxr-xr-x 2 student student 4096 Sep 29 18:09 LordOfTheRings
-student@uso:​~$ rmdir "​LordOfTheRings"​ +student@uso:​~/uso_lab02$ rmdir "​LordOfTheRings"​ 
-student@uso:​~$ ls -l+student@uso:​~/uso_lab02$ ls -l
 total 8 total 8
 drwxr-xr-x 2 student student 4096 Sep 29 18:02 Avengers drwxr-xr-x 2 student student 4096 Sep 29 18:02 Avengers
 drwxr-xr-x 2 student student 4096 Sep 29 17:44 GameOfThrones drwxr-xr-x 2 student student 4096 Sep 29 17:44 GameOfThrones
 </​code>​ </​code>​
 +
 ==== Redenumirea și mutarea fișierelor și directoarelor ==== ==== Redenumirea și mutarea fișierelor și directoarelor ====
  
 <code bash> <code bash>
-student@uso:​~$ ls+student@uso:​~/uso_lab02$ ls
 GameOfThrones GameOfThrones
-student@uso:​~$ mv GameOfThrones ThroneOfGames +student@uso:​~/uso_lab02$ mv GameOfThrones ThroneOfGames 
-student@uso:​~$ ls+student@uso:​~/uso_lab02$ ls
 ThroneOfGames ThroneOfGames
 </​code>​ </​code>​
 +
 ==== Copierea fișierelor și directoarelor ==== ==== Copierea fișierelor și directoarelor ====
  
 <code bash> <code bash>
-student@uso:​~$ cp Avengers/​Thor /tmp/ +student@uso:​~/uso_lab02$ cp Avengers/​Thor /tmp/ 
-student@uso:​~$ ls /tmp/+student@uso:​~/uso_lab02$ ls /tmp/
 Thor  ssh-ApUMKI3HSJ Thor  ssh-ApUMKI3HSJ
 </​code>​ </​code>​
Line 189: Line 189:
  
 <code bash> <code bash>
-student@uso:​~$ ls -al+student@uso:​~/uso_lab02$ ls -al
 total 8 total 8
 drwxr-xr-x 5 student student 4096 Sep 29 18:41 . drwxr-xr-x 5 student student 4096 Sep 29 18:41 .
Line 197: Line 197:
 </​code>​ </​code>​
 <code bash> <code bash>
-student@uso:​~/​Avengers$ ls -l+student@uso:​~/uso_lab02/Avengers$ ls -l
 total 0 total 0
 -rw-r--r-- 1 student student 0 Sep 29 18:20 Captain America -rw-r--r-- 1 student student 0 Sep 29 18:20 Captain America
 -rw-r--r-- 1 student student 0 Sep 29 18:20 Iron Man -rw-r--r-- 1 student student 0 Sep 29 18:20 Iron Man
 -rw-r--r-- 1 student student 0 Sep 29 18:20 Thor -rw-r--r-- 1 student student 0 Sep 29 18:20 Thor
-student@uso:​~/​Avengers$ touch .Hulk +student@uso:​~/uso_lab02/Avengers$ touch .Hulk 
-student@uso:​~/​Avengers$ ls -l+student@uso:​~/uso_lab02/Avengers$ ls -l
 total 0 total 0
 -rw-r--r-- 1 student student 0 Sep 29 18:20 Captain America -rw-r--r-- 1 student student 0 Sep 29 18:20 Captain America
 -rw-r--r-- 1 student student 0 Sep 29 18:20 Iron Man -rw-r--r-- 1 student student 0 Sep 29 18:20 Iron Man
 -rw-r--r-- 1 student student 0 Sep 29 18:20 Thor -rw-r--r-- 1 student student 0 Sep 29 18:20 Thor
-student@uso:​~/​Avengers$ ls -al+student@uso:​~/uso_lab02/Avengers$ ls -al
 total 8 total 8
 drwxr-xr-x 2 student student 4096 Oct  6 16:44 . drwxr-xr-x 2 student student 4096 Oct  6 16:44 .
Line 220: Line 220:
  
 <code bash> <code bash>
-student@uso:​~$ file Picture.abc+student@uso:​~/uso_lab02$ file Picture.abc
 Picture.abc:​ PNG image data, 742 x 320, 8-bit/color RGBA, non-interlaced Picture.abc:​ PNG image data, 742 x 320, 8-bit/color RGBA, non-interlaced
-student@uso:​~$ file index.rst+student@uso:​~/uso_lab02$ file index.rst
 index.rst: ASCII text index.rst: ASCII text
-student@uso:​~$ file archive.tar+student@uso:​~/uso_lab02$ file archive.tar
 archive.tar:​ POSIX tar archive (GNU)  archive.tar:​ POSIX tar archive (GNU) 
 </​code>​ </​code>​
Line 230: Line 230:
  
 <code bash> <code bash>
-student@uso:​~$ ln -s ~/ . +student@uso:​~/uso_lab02$ ln -s ~/ . 
-student@uso:​~$ ls -l+student@uso:​~/uso_lab02$ ls -l
 total 0 total 0
 lrwxrwxrwx 1 student student 28 Oct  6 17:58 mkdir -> /​home/​student/​ lrwxrwxrwx 1 student student 28 Oct  6 17:58 mkdir -> /​home/​student/​
Line 238: Line 238:
  
 <code bash> <code bash>
-student@uso:​~$ ./my_ls+student@uso:​~/uso_lab02$ ./my_ls
 executie ​ mkdir  my_ls  touch executie ​ mkdir  my_ls  touch
 </​code>​ </​code>​
  
uso/laboratoare/laborator-02/cheatsheet.1633369426.txt.gz · Last modified: 2021/10/11 23:02 (external edit)
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0