How do you delete a folder that contains spaces?How do I switch between Ubuntu and Vista and how do I delete Ubuntu?How do I remove a rar file that has stuck on the applications/places toolbar?How do I remove the brontok virus that has infected my Ubuntu via Wine?

Is there any way my opponent can prevent me from winning in this situation?

Compatibility level of SQL Server

Is it possible for a moon to have a higher surface gravity than the planet it is attached to?

Furnace: pipe is leaking when switched to air-conditioning

Most general definition of differentiation

Conditional types in TypeScript

Resigned after working at company for 2 months. A year later, I would like to apply for a different position at that same company. Is it worth trying?

Evil plans - how do you come up with interesting ones?

Are optimal hyperparameters still optimal for a deeper neural net architecture?

Mirrors on both bars

What does "a flight to quality" mean?

String replacement with dictionaries -- follow up

Does Mind Blast work through barriers (e.g. walls)?

How can I repair a leak in a PVC water line without bringing down the system for an extended period of time?

How far apart are stars in a binary system?

Where to find the code for the terminal commands?

Visual Studio Code PHP Intelephense Keep Showing Not Necessary Error

Running DOS, Windows 3, and Windows 98 from one FAT32 partition?

Should user input be validated for its length in PHP (server side) as a security measure?

Can two moons have intersecting orbits yet be guaranteed not to collide?

What's the best way to keep cover of a pan slightly opened?

Why impeachment now?

Does "dd" by itself do anything?

mimic a image frame



How do you delete a folder that contains spaces?


How do I switch between Ubuntu and Vista and how do I delete Ubuntu?How do I remove a rar file that has stuck on the applications/places toolbar?How do I remove the brontok virus that has infected my Ubuntu via Wine?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;









0


















So I finally got my Ubuntu box up and running, ran the LAMP install, and successfully loaded up the apache2 webserver, and php5. The one thing I didn't want is for Ubuntu during the installation to take one whole 1TB drive that contained a ton of stuff, but it was a backup drive so no biggie. But now I was transferring pics to the /var/www location and it copied a directory that contains spaces. Terminal seems to hang when I use the rm command, any ideas would be appreciated, thanks guys.










share|improve this question




















  • 1





    What exactly do you add after the "rm"?

    – Paul Woitaschek
    May 21 '12 at 0:02











  • usually after the rm i enter angelo's Pictures, then i tried Angelo'sPictures, and the terminal just went to a area where i could type in, hit enter but nothing would ever happend after that, and it stayed that way until I closed the terminal window.

    – pewterss
    May 21 '12 at 1:57











  • Forgot to add I had to enter the root password since i used sudo... i just used the rm -r and double quotes and that did the trick. Thanks for your response as well.

    – pewterss
    May 21 '12 at 2:04











  • Ah, then I think I know what the problem was in the first place: the single quote in Angelo's is not seen as a character in the file name but as a special character. I bet that if you tried Angelo's Pictures it'll work.

    – Tomas
    May 21 '12 at 4:17

















0


















So I finally got my Ubuntu box up and running, ran the LAMP install, and successfully loaded up the apache2 webserver, and php5. The one thing I didn't want is for Ubuntu during the installation to take one whole 1TB drive that contained a ton of stuff, but it was a backup drive so no biggie. But now I was transferring pics to the /var/www location and it copied a directory that contains spaces. Terminal seems to hang when I use the rm command, any ideas would be appreciated, thanks guys.










share|improve this question




















  • 1





    What exactly do you add after the "rm"?

    – Paul Woitaschek
    May 21 '12 at 0:02











  • usually after the rm i enter angelo's Pictures, then i tried Angelo'sPictures, and the terminal just went to a area where i could type in, hit enter but nothing would ever happend after that, and it stayed that way until I closed the terminal window.

    – pewterss
    May 21 '12 at 1:57











  • Forgot to add I had to enter the root password since i used sudo... i just used the rm -r and double quotes and that did the trick. Thanks for your response as well.

    – pewterss
    May 21 '12 at 2:04











  • Ah, then I think I know what the problem was in the first place: the single quote in Angelo's is not seen as a character in the file name but as a special character. I bet that if you tried Angelo's Pictures it'll work.

    – Tomas
    May 21 '12 at 4:17













0













0









0








So I finally got my Ubuntu box up and running, ran the LAMP install, and successfully loaded up the apache2 webserver, and php5. The one thing I didn't want is for Ubuntu during the installation to take one whole 1TB drive that contained a ton of stuff, but it was a backup drive so no biggie. But now I was transferring pics to the /var/www location and it copied a directory that contains spaces. Terminal seems to hang when I use the rm command, any ideas would be appreciated, thanks guys.










share|improve this question














So I finally got my Ubuntu box up and running, ran the LAMP install, and successfully loaded up the apache2 webserver, and php5. The one thing I didn't want is for Ubuntu during the installation to take one whole 1TB drive that contained a ton of stuff, but it was a backup drive so no biggie. But now I was transferring pics to the /var/www location and it copied a directory that contains spaces. Terminal seems to hang when I use the rm command, any ideas would be appreciated, thanks guys.







removing






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked May 20 '12 at 23:44









pewtersspewterss

831 gold badge2 silver badges6 bronze badges




831 gold badge2 silver badges6 bronze badges










  • 1





    What exactly do you add after the "rm"?

    – Paul Woitaschek
    May 21 '12 at 0:02











  • usually after the rm i enter angelo's Pictures, then i tried Angelo'sPictures, and the terminal just went to a area where i could type in, hit enter but nothing would ever happend after that, and it stayed that way until I closed the terminal window.

    – pewterss
    May 21 '12 at 1:57











  • Forgot to add I had to enter the root password since i used sudo... i just used the rm -r and double quotes and that did the trick. Thanks for your response as well.

    – pewterss
    May 21 '12 at 2:04











  • Ah, then I think I know what the problem was in the first place: the single quote in Angelo's is not seen as a character in the file name but as a special character. I bet that if you tried Angelo's Pictures it'll work.

    – Tomas
    May 21 '12 at 4:17












  • 1





    What exactly do you add after the "rm"?

    – Paul Woitaschek
    May 21 '12 at 0:02











  • usually after the rm i enter angelo's Pictures, then i tried Angelo'sPictures, and the terminal just went to a area where i could type in, hit enter but nothing would ever happend after that, and it stayed that way until I closed the terminal window.

    – pewterss
    May 21 '12 at 1:57











  • Forgot to add I had to enter the root password since i used sudo... i just used the rm -r and double quotes and that did the trick. Thanks for your response as well.

    – pewterss
    May 21 '12 at 2:04











  • Ah, then I think I know what the problem was in the first place: the single quote in Angelo's is not seen as a character in the file name but as a special character. I bet that if you tried Angelo's Pictures it'll work.

    – Tomas
    May 21 '12 at 4:17







1




1





What exactly do you add after the "rm"?

– Paul Woitaschek
May 21 '12 at 0:02





What exactly do you add after the "rm"?

– Paul Woitaschek
May 21 '12 at 0:02













usually after the rm i enter angelo's Pictures, then i tried Angelo'sPictures, and the terminal just went to a area where i could type in, hit enter but nothing would ever happend after that, and it stayed that way until I closed the terminal window.

– pewterss
May 21 '12 at 1:57





usually after the rm i enter angelo's Pictures, then i tried Angelo'sPictures, and the terminal just went to a area where i could type in, hit enter but nothing would ever happend after that, and it stayed that way until I closed the terminal window.

– pewterss
May 21 '12 at 1:57













Forgot to add I had to enter the root password since i used sudo... i just used the rm -r and double quotes and that did the trick. Thanks for your response as well.

– pewterss
May 21 '12 at 2:04





Forgot to add I had to enter the root password since i used sudo... i just used the rm -r and double quotes and that did the trick. Thanks for your response as well.

– pewterss
May 21 '12 at 2:04













Ah, then I think I know what the problem was in the first place: the single quote in Angelo's is not seen as a character in the file name but as a special character. I bet that if you tried Angelo's Pictures it'll work.

– Tomas
May 21 '12 at 4:17





Ah, then I think I know what the problem was in the first place: the single quote in Angelo's is not seen as a character in the file name but as a special character. I bet that if you tried Angelo's Pictures it'll work.

– Tomas
May 21 '12 at 4:17










2 Answers
2






active

oldest

votes


















4



















Your terminal hangs, that's very odd. In the terminal I'm usually able to remove spaces by escaping the space character with a backslash:



rm -r test dir



If that doesn't work, have you tried enclosing it in single or double quotes:



rm -r "test dir" or rm -r 'test dir'



Another idea would be to install a terminal file manager such as Midnight Commander and try to remove the file that way.
Good luck!






share|improve this answer



























  • +1 but... rm dirpath -r works although it is undocumented, is at variance with the standard unix command -options file ... convention and just looks weird. It's probably better to keep to the standard habit. For example awk /etc/passwd -F: 'print $1' yields an error (even though cat /etc/motd -E works).

    – msw
    May 21 '12 at 0:40











  • Good call. The problem you mention seems not to exist for rm -r. I'll change my answer to make it a bit more neat.

    – Tomas
    May 21 '12 at 1:19











  • haven't tried the double quotes, i will give that a try.

    – pewterss
    May 21 '12 at 1:58











  • oh yeah, the double quotes worked like a charm, thanks guys.

    – pewterss
    May 21 '12 at 2:03











  • Also you can press Esc or tab to match files. If you enter the start of the name and hit either, it will auto-match the remainder.

    – gecko
    May 21 '12 at 2:12



















0



















I had the similar issue that you had -
i had 2 directories "push_apk_to Playstore/" & push_apk_to_Playstore/ , & i had to delete the directory push_apk_to Playstore/
I finally resolved the issue by applying a statement
sudo rm -rf push_apk_to Playstore
which successfully deleted the directory containing space .






share|improve this answer


























    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "89"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );














    draft saved

    draft discarded
















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f140019%2fhow-do-you-delete-a-folder-that-contains-spaces%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown


























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    4



















    Your terminal hangs, that's very odd. In the terminal I'm usually able to remove spaces by escaping the space character with a backslash:



    rm -r test dir



    If that doesn't work, have you tried enclosing it in single or double quotes:



    rm -r "test dir" or rm -r 'test dir'



    Another idea would be to install a terminal file manager such as Midnight Commander and try to remove the file that way.
    Good luck!






    share|improve this answer



























    • +1 but... rm dirpath -r works although it is undocumented, is at variance with the standard unix command -options file ... convention and just looks weird. It's probably better to keep to the standard habit. For example awk /etc/passwd -F: 'print $1' yields an error (even though cat /etc/motd -E works).

      – msw
      May 21 '12 at 0:40











    • Good call. The problem you mention seems not to exist for rm -r. I'll change my answer to make it a bit more neat.

      – Tomas
      May 21 '12 at 1:19











    • haven't tried the double quotes, i will give that a try.

      – pewterss
      May 21 '12 at 1:58











    • oh yeah, the double quotes worked like a charm, thanks guys.

      – pewterss
      May 21 '12 at 2:03











    • Also you can press Esc or tab to match files. If you enter the start of the name and hit either, it will auto-match the remainder.

      – gecko
      May 21 '12 at 2:12
















    4



















    Your terminal hangs, that's very odd. In the terminal I'm usually able to remove spaces by escaping the space character with a backslash:



    rm -r test dir



    If that doesn't work, have you tried enclosing it in single or double quotes:



    rm -r "test dir" or rm -r 'test dir'



    Another idea would be to install a terminal file manager such as Midnight Commander and try to remove the file that way.
    Good luck!






    share|improve this answer



























    • +1 but... rm dirpath -r works although it is undocumented, is at variance with the standard unix command -options file ... convention and just looks weird. It's probably better to keep to the standard habit. For example awk /etc/passwd -F: 'print $1' yields an error (even though cat /etc/motd -E works).

      – msw
      May 21 '12 at 0:40











    • Good call. The problem you mention seems not to exist for rm -r. I'll change my answer to make it a bit more neat.

      – Tomas
      May 21 '12 at 1:19











    • haven't tried the double quotes, i will give that a try.

      – pewterss
      May 21 '12 at 1:58











    • oh yeah, the double quotes worked like a charm, thanks guys.

      – pewterss
      May 21 '12 at 2:03











    • Also you can press Esc or tab to match files. If you enter the start of the name and hit either, it will auto-match the remainder.

      – gecko
      May 21 '12 at 2:12














    4















    4











    4









    Your terminal hangs, that's very odd. In the terminal I'm usually able to remove spaces by escaping the space character with a backslash:



    rm -r test dir



    If that doesn't work, have you tried enclosing it in single or double quotes:



    rm -r "test dir" or rm -r 'test dir'



    Another idea would be to install a terminal file manager such as Midnight Commander and try to remove the file that way.
    Good luck!






    share|improve this answer
















    Your terminal hangs, that's very odd. In the terminal I'm usually able to remove spaces by escaping the space character with a backslash:



    rm -r test dir



    If that doesn't work, have you tried enclosing it in single or double quotes:



    rm -r "test dir" or rm -r 'test dir'



    Another idea would be to install a terminal file manager such as Midnight Commander and try to remove the file that way.
    Good luck!







    share|improve this answer















    share|improve this answer




    share|improve this answer








    edited May 21 '12 at 1:19

























    answered May 21 '12 at 0:04









    TomasTomas

    9491 gold badge8 silver badges20 bronze badges




    9491 gold badge8 silver badges20 bronze badges















    • +1 but... rm dirpath -r works although it is undocumented, is at variance with the standard unix command -options file ... convention and just looks weird. It's probably better to keep to the standard habit. For example awk /etc/passwd -F: 'print $1' yields an error (even though cat /etc/motd -E works).

      – msw
      May 21 '12 at 0:40











    • Good call. The problem you mention seems not to exist for rm -r. I'll change my answer to make it a bit more neat.

      – Tomas
      May 21 '12 at 1:19











    • haven't tried the double quotes, i will give that a try.

      – pewterss
      May 21 '12 at 1:58











    • oh yeah, the double quotes worked like a charm, thanks guys.

      – pewterss
      May 21 '12 at 2:03











    • Also you can press Esc or tab to match files. If you enter the start of the name and hit either, it will auto-match the remainder.

      – gecko
      May 21 '12 at 2:12


















    • +1 but... rm dirpath -r works although it is undocumented, is at variance with the standard unix command -options file ... convention and just looks weird. It's probably better to keep to the standard habit. For example awk /etc/passwd -F: 'print $1' yields an error (even though cat /etc/motd -E works).

      – msw
      May 21 '12 at 0:40











    • Good call. The problem you mention seems not to exist for rm -r. I'll change my answer to make it a bit more neat.

      – Tomas
      May 21 '12 at 1:19











    • haven't tried the double quotes, i will give that a try.

      – pewterss
      May 21 '12 at 1:58











    • oh yeah, the double quotes worked like a charm, thanks guys.

      – pewterss
      May 21 '12 at 2:03











    • Also you can press Esc or tab to match files. If you enter the start of the name and hit either, it will auto-match the remainder.

      – gecko
      May 21 '12 at 2:12

















    +1 but... rm dirpath -r works although it is undocumented, is at variance with the standard unix command -options file ... convention and just looks weird. It's probably better to keep to the standard habit. For example awk /etc/passwd -F: 'print $1' yields an error (even though cat /etc/motd -E works).

    – msw
    May 21 '12 at 0:40





    +1 but... rm dirpath -r works although it is undocumented, is at variance with the standard unix command -options file ... convention and just looks weird. It's probably better to keep to the standard habit. For example awk /etc/passwd -F: 'print $1' yields an error (even though cat /etc/motd -E works).

    – msw
    May 21 '12 at 0:40













    Good call. The problem you mention seems not to exist for rm -r. I'll change my answer to make it a bit more neat.

    – Tomas
    May 21 '12 at 1:19





    Good call. The problem you mention seems not to exist for rm -r. I'll change my answer to make it a bit more neat.

    – Tomas
    May 21 '12 at 1:19













    haven't tried the double quotes, i will give that a try.

    – pewterss
    May 21 '12 at 1:58





    haven't tried the double quotes, i will give that a try.

    – pewterss
    May 21 '12 at 1:58













    oh yeah, the double quotes worked like a charm, thanks guys.

    – pewterss
    May 21 '12 at 2:03





    oh yeah, the double quotes worked like a charm, thanks guys.

    – pewterss
    May 21 '12 at 2:03













    Also you can press Esc or tab to match files. If you enter the start of the name and hit either, it will auto-match the remainder.

    – gecko
    May 21 '12 at 2:12






    Also you can press Esc or tab to match files. If you enter the start of the name and hit either, it will auto-match the remainder.

    – gecko
    May 21 '12 at 2:12














    0



















    I had the similar issue that you had -
    i had 2 directories "push_apk_to Playstore/" & push_apk_to_Playstore/ , & i had to delete the directory push_apk_to Playstore/
    I finally resolved the issue by applying a statement
    sudo rm -rf push_apk_to Playstore
    which successfully deleted the directory containing space .






    share|improve this answer





























      0



















      I had the similar issue that you had -
      i had 2 directories "push_apk_to Playstore/" & push_apk_to_Playstore/ , & i had to delete the directory push_apk_to Playstore/
      I finally resolved the issue by applying a statement
      sudo rm -rf push_apk_to Playstore
      which successfully deleted the directory containing space .






      share|improve this answer



























        0















        0











        0









        I had the similar issue that you had -
        i had 2 directories "push_apk_to Playstore/" & push_apk_to_Playstore/ , & i had to delete the directory push_apk_to Playstore/
        I finally resolved the issue by applying a statement
        sudo rm -rf push_apk_to Playstore
        which successfully deleted the directory containing space .






        share|improve this answer














        I had the similar issue that you had -
        i had 2 directories "push_apk_to Playstore/" & push_apk_to_Playstore/ , & i had to delete the directory push_apk_to Playstore/
        I finally resolved the issue by applying a statement
        sudo rm -rf push_apk_to Playstore
        which successfully deleted the directory containing space .







        share|improve this answer













        share|improve this answer




        share|improve this answer










        answered Sep 27 at 7:27









        sambitsambit

        114 bronze badges




        114 bronze badges































            draft saved

            draft discarded















































            Thanks for contributing an answer to Ask Ubuntu!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f140019%2fhow-do-you-delete-a-folder-that-contains-spaces%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown









            Popular posts from this blog

            Tamil (spriik) Luke uk diar | Nawigatjuun

            Align equal signs while including text over equalitiesAMS align: left aligned text/math plus multicolumn alignmentMultiple alignmentsAligning equations in multiple placesNumbering and aligning an equation with multiple columnsHow to align one equation with another multline equationUsing \ in environments inside the begintabularxNumber equations and preserving alignment of equal signsHow can I align equations to the left and to the right?Double equation alignment problem within align enviromentAligned within align: Why are they right-aligned?

            Training a classifier when some of the features are unknownWhy does Gradient Boosting regression predict negative values when there are no negative y-values in my training set?How to improve an existing (trained) classifier?What is effect when I set up some self defined predisctor variables?Why Matlab neural network classification returns decimal values on prediction dataset?Fitting and transforming text data in training, testing, and validation setsHow to quantify the performance of the classifier (multi-class SVM) using the test data?How do I control for some patients providing multiple samples in my training data?Training and Test setTraining a convolutional neural network for image denoising in MatlabShouldn't an autoencoder with #(neurons in hidden layer) = #(neurons in input layer) be “perfect”?