Removing multiple files? What a pain!
Posted: Tue Jul 18, 2006 11:40 am
I, the windows guy, stepped into the Linux world.
My hands are tired from typing all those tiny commands in my SSH client. I wonder how come I cannot tell the damn machine 'delete the whole stuff inside [dir] and don't ask me anything'. rm description says:
-r — recursive. Will delete a directory and all files and subdirectories it contains.
I run 'rm -r mydir' and it should just delete the whole dir. But it doesn't, it keeps asking me for confirmation of deleting subdirectories and files.
rm: descend into directory `php-5.1.4'? y
rm: descend into directory `php-5.1.4/ext'? y
rm: descend into directory `php-5.1.4/ext/standard'? y
rm: descend into directory `php-5.1.4/ext/standard/tests'? y
rm: descend into directory `php-5.1.4/ext/standard/tests/file'? y
rm: remove regular file `php-5.1.4/ext/standard/tests/file/bug32160.phpt'? y
rm: remove regular file `php-5.1.4/ext/standard/tests/file/bug32160.txt'? y
rm: remove regular file `php-5.1.4/ext/standard/tests/file/bug35740.phpt'? y
rm: remove regular file `php-5.1.4/ext/standard/tests/file/bug35781.phpt'? y
rm: remove regular file `php-5.1.4/ext/standard/tests/file/bug37158.phpt'? y
I don't want to believe you can't delete multiple files/dirs quickly. Please tell me I am wrong and let me know the correct way to do that.
-r — recursive. Will delete a directory and all files and subdirectories it contains.
I run 'rm -r mydir' and it should just delete the whole dir. But it doesn't, it keeps asking me for confirmation of deleting subdirectories and files.
rm: descend into directory `php-5.1.4'? y
rm: descend into directory `php-5.1.4/ext'? y
rm: descend into directory `php-5.1.4/ext/standard'? y
rm: descend into directory `php-5.1.4/ext/standard/tests'? y
rm: descend into directory `php-5.1.4/ext/standard/tests/file'? y
rm: remove regular file `php-5.1.4/ext/standard/tests/file/bug32160.phpt'? y
rm: remove regular file `php-5.1.4/ext/standard/tests/file/bug32160.txt'? y
rm: remove regular file `php-5.1.4/ext/standard/tests/file/bug35740.phpt'? y
rm: remove regular file `php-5.1.4/ext/standard/tests/file/bug35781.phpt'? y
rm: remove regular file `php-5.1.4/ext/standard/tests/file/bug37158.phpt'? y
I don't want to believe you can't delete multiple files/dirs quickly. Please tell me I am wrong and let me know the correct way to do that.