|
|
Copying, moving or deleting directories - Linux
|
Views : 369
|
|
Tagged in : Linux
|
|
|
Report This Scrap as Inappropriate We request you to choose the appropriate categroy and subcategory that suits your
objectionable concern about the scrap, So that our team can review and find out whether it violates our Guidelines or the
scrap is not suitable for all viewers.
|
Copying, moving or deleting directories
To create a new directory:
mkdir newdir
To copy the directory 'dir' in the destination directory 'destdir':
cp -a dir destdir
(Note: the '-a' option does a recursive copy - that is includes the subdirectories - and preserves the attributes of files)
To move the whole directory 'dir' inside the existing 'destdir':
mv dir1 destdir
To rename directory 'dir' as 'dir2':
mv dir dir2
To delete the directory 'dir' and all its content:
rm -rf dir
|
|
By - Sanju, On - 2009-11-20 |
|
|
|