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;
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
add a comment
|
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
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 inAngelo's
is not seen as a character in the file name but as a special character. I bet that if you triedAngelo's Pictures
it'll work.
– Tomas
May 21 '12 at 4:17
add a comment
|
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
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
removing
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 inAngelo's
is not seen as a character in the file name but as a special character. I bet that if you triedAngelo's Pictures
it'll work.
– Tomas
May 21 '12 at 4:17
add a comment
|
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 inAngelo's
is not seen as a character in the file name but as a special character. I bet that if you triedAngelo'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
add a comment
|
2 Answers
2
active
oldest
votes
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!
+1 but...rm dirpath -r
works although it is undocumented, is at variance with the standard unixcommand -options file ...
convention and just looks weird. It's probably better to keep to the standard habit. For exampleawk /etc/passwd -F: 'print $1'
yields an error (even thoughcat /etc/motd -E
works).
– msw
May 21 '12 at 0:40
Good call. The problem you mention seems not to exist forrm -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
add a comment
|
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 .
add a comment
|
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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!
+1 but...rm dirpath -r
works although it is undocumented, is at variance with the standard unixcommand -options file ...
convention and just looks weird. It's probably better to keep to the standard habit. For exampleawk /etc/passwd -F: 'print $1'
yields an error (even thoughcat /etc/motd -E
works).
– msw
May 21 '12 at 0:40
Good call. The problem you mention seems not to exist forrm -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
add a comment
|
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!
+1 but...rm dirpath -r
works although it is undocumented, is at variance with the standard unixcommand -options file ...
convention and just looks weird. It's probably better to keep to the standard habit. For exampleawk /etc/passwd -F: 'print $1'
yields an error (even thoughcat /etc/motd -E
works).
– msw
May 21 '12 at 0:40
Good call. The problem you mention seems not to exist forrm -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
add a comment
|
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!
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!
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 unixcommand -options file ...
convention and just looks weird. It's probably better to keep to the standard habit. For exampleawk /etc/passwd -F: 'print $1'
yields an error (even thoughcat /etc/motd -E
works).
– msw
May 21 '12 at 0:40
Good call. The problem you mention seems not to exist forrm -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
add a comment
|
+1 but...rm dirpath -r
works although it is undocumented, is at variance with the standard unixcommand -options file ...
convention and just looks weird. It's probably better to keep to the standard habit. For exampleawk /etc/passwd -F: 'print $1'
yields an error (even thoughcat /etc/motd -E
works).
– msw
May 21 '12 at 0:40
Good call. The problem you mention seems not to exist forrm -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
add a comment
|
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 .
add a comment
|
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 .
add a comment
|
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 .
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 .
answered Sep 27 at 7:27
sambitsambit
114 bronze badges
114 bronze badges
add a comment
|
add a comment
|
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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 triedAngelo's Pictures
it'll work.– Tomas
May 21 '12 at 4:17