Announcement

Collapse
No announcement yet.

can't delete folder using command line

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    can't delete folder using command line

    A mount point folder has been created in my home folder by the Disk and File systems utility. It shows in Konqueror and Dolphin as: <mount point>, in bash as <mount\ point>.
    I have manually created a new mount point in the mnt folder for the drive I was setting up, and I don't want the redundant folder in my 'home' directory.
    I cannot delete, chown or chmod this folder from the command line. After any attempt to reference the directory bash returns the following: bash: syntax error near unexpected token `newline'
    I suppose the special characters around the directory name have some bearing on how I should be referring to the folder at the command line.
    Any advice?

    #2
    Re: can't delete folder using command line

    You can access it from konqueror right? I'd say, if you just want to do something like delete it, to just do it from konqueror.
    Try opening up a terminal and typing in
    Code:
    kdesu konqueror
    that should have a little popup ask you for your password, and after that you'll have an instance of konqueror running as root that should be able to delete it with no problems. maybe.

    Comment


      #3
      Re: can't delete folder using command line

      You could definitely follow molloollom's instruction if you want a graphical interface, or, you can delete it from the command line as you were originally trying to do. If you would like to use Konsole, just use the command "sudo rm -rf (the location of the file)". Say I wanted to delete a file called abc123 located on my desktop, I would type "sudo rm -rf /home/username/Desktop/abc123" (replace "username" with your username), and that's it! Pretty simple stuff, it's all a matter of preference as Kubuntu supplies you with multiple ways to accomplish the same task.
      Asus G1S-X3:
      Intel Core2 Duo T7500, Nvidia GeForce 8600M GT, 4Gb PC2-5300, 320Gb Hitachi 7k320, Linux ( )

      Comment


        #4
        Re: can't delete folder using command line

        yup! I have tried all of that, but when I enter the directory name in the format that bash or konqueror presents it to me, i.e <mount point> (konqueror) or <mount/ point> (bash), an error message is always returned indicating that the directory name is other than what is shown. The two characters "<"and ">" seem to be messing up the command line, if I leave them out, the bash shell (or Konqueror) command line return that no such directory or file name exists. If I put them in a syntax error is returned as per my first post. Hmmmm.

        Comment


          #5
          Re: can't delete folder using command line

          Quote the filename:
          Code:
          rm '<mount point>'
          or use the escape char '\' in front of special characters
          Code:
          rm \<mount\ point\>

          Comment


            #6
            Re: can't delete folder using command line

            Brilliant, problem solved, lesson learnt, thanks Kubicle,

            Regards parmstro

            Comment

            Working...
            X