![]() |
Show 150 posts per page |
.dsy:it. (http://www.dsy.it/forum/)
- Tech (http://www.dsy.it/forum/forumdisplay.php?forumid=189)
-- [DATA MANAGEMENT] - Manipolazione delle directory (http://www.dsy.it/forum/showthread.php?threadid=10561)
[DATA MANAGEMENT] - Manipolazione delle directory
Manipolazione di directory:
Il file system di Unix offre un modo per categorizzare e organizzare le directory con cui si lavora. Le directory offrono un modo per raggruppare le cose in gruppi relativi allo stesso argomento. É possibile modificare il file system aggiungendo o eliminando file e directory e spostando i file da una directory all'altra. I comandi che permettono di compiere le operazioni fondamentali di manipolazione dei file (eliminazione, ridenominazione, spostamento e copia dei file) sono tra quelli più utilizzati in assoluto! Proprio per tale motivo, questo thread prende in considerazione questi comandi fondamentali di manipolazione di directory in Unix.
code:
[root@localhost root]# pwd /root [root@localhost root]#
code:
[root@localhost root]# cd /home/neo [root@localhost neo]# ls -la total 2 drwxr-x--- 30 root root 4096 Feb 19 22:00 ./ drwxr-x--- 19 root root 4096 Feb 19 22:00 ../ [root@localhost neo]#
code:
[root@localhost neo]# mkdir Test [root@localhost neo]#
code:
[root@localhost neo]# ls -la total 3 drwxr-x--- 30 root root 4096 Feb 19 22:00 ./ drwxr-x--- 19 root root 4096 Feb 19 22:00 ../ drwxr-x--- 19 root root 4096 Feb 20 20:30 prova/ [root@localhost neo]# ls -la prova total 2 drwxr-x--- 30 root root 4096 Feb 20 20:30 ./ drwxr-x--- 19 root root 4096 Feb 20 20:30 ../ [root@localhost neo]#
code:
[root@localhost root]# pwd /root [root@localhost root]#
code:
[root@localhost root]# cd /home/neo/ [root@localhost neo]#
code:
[root@localhost neo]# ls -la total 3 drwxr-x--- 30 root root 4096 Feb 19 22:00 ./ drwxr-x--- 19 root root 4096 Feb 19 22:00 ../ drwxr-x--- 19 root root 4096 Feb 19 22:00 Directory_1/ drwxr-x--- 19 root root 4096 Feb 19 22:00 Test/ [root@localhost neo]#
code:
[root@localhost root]# mv Test Directory_1 'Test' -> '/Directory_1/Test' [root@localhost root]#
code:
[root@localhost neo]# ls -la total 2 drwxr-x--- 30 root root 4096 Feb 19 22:00 ./ drwxr-x--- 19 root root 4096 Feb 19 22:00 ../ drwxr-x--- 19 root root 4096 Feb 19 22:00 Directory_1/ [root@localhost root]#
code:
[root@localhost neo]# cd /home/neo/Directory_1 [root@localhost Test]# ls -la total 3 drwxr-x--- 30 root root 4096 Feb 19 22:00 ./ drwxr-x--- 19 root root 4096 Feb 19 22:00 ../ -rw-r--r-- 1 root root 24 Jan 22 21:58 Test_1
code:
[root@localhost root]# pwd /root [root@localhost root]#
code:
[root@localhost root]# cd /home/neo [root@localhost neo]# ls -la total 3 drwxr-x--- 30 root root 4096 Feb 19 22:00 ./ drwxr-x--- 19 root root 4096 Feb 19 22:00 ../ drwxr-x--- 19 root root 4096 Feb 20 20:30 prova/ [root@localhost neo]#
code:
[root@localhost neo]# rmdir Test [root@localhost neo]#
code:
[root@localhost neo]# ls -la total 2 drwxr-x--- 30 root root 4096 Feb 19 22:00 ./ drwxr-x--- 19 root root 4096 Feb 19 22:00 ../ [root@localhost neo]#
code:
[root@localhost neo]# rmdir prova rmdir: 'prova': Directory not empty [root@localhost neo]# rm -r prova [root@localhost neo]# Controllo se è stata rimossa la cartella 'Test' da /home/neo: [code][root@localhost neo]# ls -la total 2 drwxr-x--- 30 root root 4096 Feb 19 22:00 ./ drwxr-x--- 19 root root 4096 Feb 19 22:00 ../ [root@localhost neo]#
__________________
Nicolò CANEPARO - nick@bmm.it
University Student & Researcher
at D.S.I. & D.I.Co. Depts., Milan state University, Italy.
curriculum - pictures - forum - nickland.org - dsy.it
| All times are GMT. The time now is 06:00. | Show all 1 posts from this thread on one page |
Powered by: vBulletin Version 2.3.1
Copyright © Jelsoft Enterprises Limited 2000 - 2002.