LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mageia
User Name
Password
Mageia This forum is for the discussion of Mageia Linux.

Notices


Reply
  Search this Thread
Old 06-01-2019, 04:05 AM   #1
Milo4t
Member
 
Registered: Sep 2003
Location: Canberra, Australia
Distribution: Mageia #4.1
Posts: 45

Rep: Reputation: 11
Unhappy 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.
 
Old 06-01-2019, 05:43 AM   #2
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,137
Blog Entries: 6

Rep: Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826
First thing to do with that NTFS drive is to plug it into a Microsoft machine and run chkdsk on it.
 
Old 06-01-2019, 08:38 AM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,691

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
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.
 
Old 06-11-2019, 04:27 AM   #4
Milo4t
Member
 
Registered: Sep 2003
Location: Canberra, Australia
Distribution: Mageia #4.1
Posts: 45

Original Poster
Rep: Reputation: 11
Angry 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!
 
  


Reply

Tags
deleting, files



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
question: 'onclick' within 'onmouseover' within 'form' within 'table' - how is it possible? rblampain Programming 4 04-25-2017 08:49 PM
Trying to delete all directories within a folder under a set size steve51184 Linux - Software 3 04-28-2016 10:11 PM
Tar multiple folder to multiple files to another directory and delete original folder zeroize Linux - Newbie 6 03-31-2016 07:36 PM
Can I delete files in /mnt/tmp? and Files in the trash can will not delete? M$ISBS Slackware 15 10-02-2009 11:56 PM
A script within a folder to delete the folder, script, and the folder's contents Cyberman Programming 15 10-17-2007 07:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mageia

All times are GMT -5. The time now is 02:28 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration