Announcement

Collapse
No announcement yet.

Can not delete, rename or use the mv command on an errant file

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

    [SOLVED] Can not delete, rename or use the mv command on an errant file

    About a week or so ago, something happened (I have no idea what at this point) and two files got corrupted. I ended up with a file called

    Code:
    Peter.Gabriel.Secret.World.Live.2012.720p.mkv
    But when I clicked on it, in actuality it was a completely different video. I can not delete, rename, or use the mv command as it says “no such file or directory exists.” I can copy it and delete the copy. I created a file in another directory with the same name and was able to copy it to the original directory, therefore overwriting the original file. Now I have a 2B text file instead of a 500MB video file but I still can’t delete it. It's not a matter of permissions, I think it has to do with the actual name but there are no leading or following spaces, etc., that I can see. I am running KDE Neon User Edition and using Dolphin and the command line. The errant file is on a 2TB USB drive using NTFS.
    If you think Education is expensive, try ignorance.

    The difference between genius and stupidity is genius has limits.

    #2
    You did check the immutable bit?
    "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
    – John F. Kennedy, February 26, 1962.

    Comment


      #3
      Have you tried puting the file name in quotes (single or double)? And if that doesn't work, try replacing all the periods; except for the last one; with a ?
      Using Kubuntu Linux since March 23, 2007
      "It is a capital mistake to theorize before one has data." - Sherlock Holmes

      Comment


        #4
        When ever I use youtube-dl or mps-youtube to download an mp4 video I get a half-dozen files created, a msg about "not being able to merge audio and mp4", or something like that, and then the result is an mkv file. Usually I can convert the mkv file to an mp4 file, but I got tired of that and installed a dl plugin in FireFox to dl videos and specifically select the 720p mp4 version to dl.

        I never had a file lock up the you have but I'd wager that the problem was probably caused by using one of those two programs, or a defective FF plugin.
        "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
        – John F. Kennedy, February 26, 1962.

        Comment


          #5
          I'm not sure it's anything to do with the filename, per se:
          Code:
          $ touch Peter.Gabriel.Secret.World.Live.2012.720p.mkv
          $ rm Peter.Gabriel.Secret.World.Live.2012.720p.mkv
          works just fine.
          Kubuntu 20.04

          Comment


            #6
            Originally posted by GreyGeek View Post
            You did check the immutable bit?
            First I've heard of this and apparently, I'm not understanding the lsattr and chattr commands as I keep getting "invalid argument."

            Originally posted by Snowhog View Post
            Have you tried puting the file name in quotes (single or double)? And if that doesn't work, try replacing all the periods; except for the last one; with a ?
            I tried double quotes and several wildcards. I just tried single quotes and the ? (with and without quotes, single and double) to no avail.
            If you think Education is expensive, try ignorance.

            The difference between genius and stupidity is genius has limits.

            Comment


              #7
              Who owns the file?
              Using Kubuntu Linux since March 23, 2007
              "It is a capital mistake to theorize before one has data." - Sherlock Holmes

              Comment


                #8
                I, regular user, do.

                Code:
                -rwxrwxrwx 1 specialed specialed          2 Aug 26 18:28 Peter.Gabriel.Secret.World.Live.2012.720p.mkv
                If you think Education is expensive, try ignorance.

                The difference between genius and stupidity is genius has limits.

                Comment


                  #9
                  Originally posted by SpecialEd View Post
                  >>>>>> I'm not understanding the lsattr and chattr commands as I keep getting "invalid argument."
                  Just realized those commands aren't applicable to NTFS, correct?
                  If you think Education is expensive, try ignorance.

                  The difference between genius and stupidity is genius has limits.

                  Comment


                    #10
                    Are there other files on the NTFS formatted USB drive, or is this the only one?
                    Using Kubuntu Linux since March 23, 2007
                    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                    Comment


                      #11
                      Originally posted by Snowhog View Post
                      Are there other files on the NTFS formatted USB drive, or is this the only one?
                      Oh yeah, about 850GBs.
                      If you think Education is expensive, try ignorance.

                      The difference between genius and stupidity is genius has limits.

                      Comment


                        #12
                        Do you have access to a Windows PC that you can mount the USB drive to? Can the file be deleted from Windows?
                        Using Kubuntu Linux since March 23, 2007
                        "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                        Comment


                          #13
                          Originally posted by Snowhog View Post
                          Do you have access to a Windows PC that you can mount the USB drive to? Can the file be deleted from Windows?
                          Yes I had my son do that a little while ago and got an error code. I just gave it back to him to run error checking on the disk under Windows.
                          If you think Education is expensive, try ignorance.

                          The difference between genius and stupidity is genius has limits.

                          Comment


                            #14
                            Running CHKDSK under Windows did the trick. I forget sometimes when dealing with USB drives that I'm not dealing with a Linux file system. Thanks for the help.
                            If you think Education is expensive, try ignorance.

                            The difference between genius and stupidity is genius has limits.

                            Comment

                            Working...
                            X