LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Mageia (https://www.linuxquestions.org/questions/mageia-97/)
-   -   Can't delete .xml files and a within a directory (or directory/folder) (https://www.linuxquestions.org/questions/mageia-97/cant-delete-xml-files-and-a-within-a-directory-or-directory-folder-4175654952/)

Milo4t 06-01-2019 04:05 AM

Can't delete .xml files and a within a directory (or directory/folder)
 
Scenario: I had been backing up my Plexmediaserver folder (located in /var/lib) to my NTFS backup drive with Luckybackup. I started getting errors in the backup. So decided to delete the complete folder and contents and start again (under Windows as I can't do it in Linux as /var is always mounted of course). So deleted most by renaming folders etc. due to the stupid Windows 256 character path limit!
BUT my problem is, buried in the folder structure is 4 .xml files (1.xml; 2.xml; 3.xml & 4.xml) These 4 files are located in 2 separate folders. Windows won't let me delete them. So I booted my system using SystemRescueCD. Mounted the drive and was trying to delete these files, but kept getting the message that they don't exist! But when I execute "ls -l" they are there! I can't rename them (with "mv") or anything. What is happening???? What is stopping me deleting these?
Very frustrating.

teckk 06-01-2019 05:43 AM

First thing to do with that NTFS drive is to plug it into a Microsoft machine and run chkdsk on it.

michaelk 06-01-2019 08:38 AM

Quote:

So decided to delete the complete folder and contents and start again (under Windows as I can't do it in Linux as /var is always mounted of course). So deleted most by renaming folders etc. due to the stupid Windows 256 character path limit!
I don't understand and what you posted is confusing and not true. Can you post the backup errors? Do you know if the errors are due to the backup drive or the original data?

Are you trying to delete the Plex media data files in /var/lib or the backup files? I assume the path to your server data files is something like /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/. As root you should be able to delete any file within var/lib/plexmediaserver. Make sure the server is halted before deleting files.

If the path or files contain spaces you need to use quotes or escape the space using a "" character or you will see similar errors.

Milo4t 06-11-2019 04:27 AM

Result not so great!
 
Sorry for not replying earlier - I have been a tad busy!!!!
michaelk, sorry, you are quite correct. Sometimes you think what you write is very clear in what you want to convey, then someone reads it only to point out that it is contradictory! Thankyou for pointing that out. And yes, what I meant was that I wanted to delete the plexmediaserver files from my external NTFS backup drive, not the files contained in /var/lib/!

teckk,
I booted into my Windows partition and ran chkdsk /F against my NTFS drive. Right near the end some of the messages indicated it had done something to the MFT on the drive. Straight after, Windows wouldn't load the drive. I re-ran chkdsk /F against the drive. Voila, Windows loaded the drive successfully.....BUT the drive was empty - the ENTIRE drive was empty, ALL of my files had vanished!
Luckily, I have other backups to rebuild the drive (which I am in the middle of doing right now as I type! I only lost 3 folders, (1 contained I know not what), 1 I have elsewhere and 1 too bad!

So, I'm not impressed with what chkdsk did to the drive, stuffing up my MFT!


All times are GMT -5. The time now is 11:17 AM.