LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 12-05-2013, 01:30 PM   #1
alexbib
LQ Newbie
 
Registered: Sep 2008
Location: Montreal, Canada
Distribution: debian sid
Posts: 16

Rep: Reputation: 0
unable to delete mtpfs mountpoint


So I used mtpfs to create a mountpoint for my smartphone on my computer, and after unplugging my phone I'm left with a buggy directory that I cannot delete.

rm -rf (even as root) gives me "No such file or directory" or "Is a directory" and does nothing. I tried umount to unmount it before deleting it but it didn't help. What can I do?

Thanks!
 
Old 12-06-2013, 06:06 AM   #2
corp769
Guru
 
Registered: Apr 2005
Posts: 5,807

Rep: Reputation: 996Reputation: 996Reputation: 996Reputation: 996Reputation: 996Reputation: 996Reputation: 996Reputation: 996
Check out the man page to fusermount
Code:
fusermount -u [mountpoint]
 
Old 12-06-2013, 10:35 AM   #3
alexbib
LQ Newbie
 
Registered: Sep 2008
Location: Montreal, Canada
Distribution: debian sid
Posts: 16

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by corp769 View Post
Check out the man page to fusermount
Code:
fusermount -u [mountpoint]
I get failed to unmount: Invalid argument

Edit: ok, got it to work, had to remount it and then unmount it. Thanks for the help.

Last edited by alexbib; 12-08-2013 at 12:49 PM.
 
Old 04-04-2014, 04:52 PM   #4
alexbib
LQ Newbie
 
Registered: Sep 2008
Location: Montreal, Canada
Distribution: debian sid
Posts: 16

Original Poster
Rep: Reputation: 0
I'm sorry to be a bother, but I'm having the same problem again. I'm able to mount and unmount the filesystem, but even after unmounting, I cannot delete the mount point, I get the "No such file or directory". What should I do?
 
Old 04-06-2014, 03:31 PM   #5
PClinuxOS
LQ Newbie
 
Registered: Mar 2014
Posts: 15

Rep: Reputation: Disabled
@ alexbib

Does the directory name have any special characters/symbols or spaces. If so, you need to escape the special character with a back slash or quotes. For example if the directory is called My Music and is empty, you can delete it this way:

Code:
rmdir My\ Music
#The back slash escapes the space character in My Music

Or


Code:
rmdir "My Music"
#The quotes here also escapes the space character

Other Questions

Have you tried running the sync command after umounting the device? The sync command updates the filesystem.

Have you tried deleting the directory from the file manager?

Is the directory immutable? If a file or directory has the immutable flag set, not even root can delete or modify it unless the root user removes the immutable flag.

Last edited by PClinuxOS; 04-06-2014 at 03:44 PM.
 
Old 04-06-2014, 11:47 PM   #6
alexbib
LQ Newbie
 
Registered: Sep 2008
Location: Montreal, Canada
Distribution: debian sid
Posts: 16

Original Poster
Rep: Reputation: 0
running sync worked, thanks!
 
Old 04-07-2014, 10:43 AM   #7
PClinuxOS
LQ Newbie
 
Registered: Mar 2014
Posts: 15

Rep: Reputation: Disabled
Quote:
Originally Posted by alexbib View Post
running sync worked, thanks!
You're welcome alexbib
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] mtpfs Only Mounts as Root s3phir0th115 Slackware 4 10-12-2012 06:59 PM
iPod Mountpoint Automatically Erased, Unable to Mount Again. EzNaChOs Linux - Hardware 1 02-03-2011 07:34 AM
mtpfs: operation not permitted for transfers above 20 mb schneidz Linux - Software 0 04-11-2009 11:36 PM
unable to install mtpfs but it is saying mad is missing schneidz Linux - Software 2 11-04-2008 10:59 PM
/dev/sda1 Warning: Unable to find mountpoint MooseMagnet Linux - Newbie 6 08-12-2008 11:55 PM


All times are GMT -5. The time now is 06:44 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration