Suatu ketika folder share pada linux mint mau sy hapus, yang akan dihapus cuma folder saja, tetapi file tidak akan dihapus, bagaimana caranya ? gogling ...
Bismillah
q> Folder share berada pada path /home/saifi/BROKOLI
q> Di dalam folder BROKOLI terdapat : folder1, folder2 dan folder3 , file1, file2, file3
q> akan di-delete folder1, folder2 dan folder3 ( hanya men-delete folder saja, tanpa men-delete file )
q> Ops ketemu perintahnya, masuk dulu ke path BROKOLI
[sourcecode language="bash"]cd ~/BROKOLI[/sourcecode]
q> Kemudian hapus semua folder dengan perintah ini :
[sourcecode language="bash"]rm -r */[/sourcecode]
rm = hapus / remove
-r = rekursif ( seluruh file )
*/ = semua folder
Alhamdulillah
sumber :
http://www.unix.com/linux/60891-deleting-only-directory-not-files.html
No comments:
Post a Comment