Files Won't Delete From Directory
Forum rules
Before you post please read how to get help
Before you post please read how to get help
-
- Level 2
- Posts: 86
- Joined: Fri Sep 19, 2008 6:55 am
Files Won't Delete From Directory
I am not sure whether this Topic belongs here in Software & Applications or Desktop & Window Managers.
LM 19.3 Cinn 64b
A directory of mine under my user name shows a few custom text files that cannot be deleted or moved from within nemo, nor in terminal under me or sudo. These are text files I created at one time (but now no longer need) on my external drive. These files are 0 (zero) bytes in size.
I see the files in nemo and also in terminal using ls to show contents of the directory.
a sample command:
sudo rm {file}*
rm: cannot remove '{file}': No such file or directory
I have made sure that my external and internal drive's trash bins are empty of contents
external drive = .Trash-1000 & $RECYCLE.BIN
internal drive = my .local/Share's Trash
These same problem files are also seen when browsing directory contents using nautilus.
Are there any other places to dump contents? What are some next steps? How do I get rid of these lingering files? Is there a nemo cache someplace that needs to be dumped?
LM 19.3 Cinn 64b
A directory of mine under my user name shows a few custom text files that cannot be deleted or moved from within nemo, nor in terminal under me or sudo. These are text files I created at one time (but now no longer need) on my external drive. These files are 0 (zero) bytes in size.
I see the files in nemo and also in terminal using ls to show contents of the directory.
a sample command:
sudo rm {file}*
rm: cannot remove '{file}': No such file or directory
I have made sure that my external and internal drive's trash bins are empty of contents
external drive = .Trash-1000 & $RECYCLE.BIN
internal drive = my .local/Share's Trash
These same problem files are also seen when browsing directory contents using nautilus.
Are there any other places to dump contents? What are some next steps? How do I get rid of these lingering files? Is there a nemo cache someplace that needs to be dumped?
metamorphousthe
"It's all about change"
"It's all about change"
Re: Files Won't Delete From Directory
That means you have the filename wrong. How about posting the result ofmetamorphousthe wrote: ↑Fri Mar 20, 2020 5:43 pma sample command:
sudo rm {file}*
rm: cannot remove '{file}': No such file or directory
Code: Select all
ls -al {file}*
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Your data and OS are backed up....right?
-
- Level 2
- Posts: 86
- Joined: Fri Sep 19, 2008 6:55 am
Re: Files Won't Delete From Directory
Code: Select all
$ ls -al
total 116
drwxrwxrwx 1 {user} {user} 102400 Mar 20 19:10 .
drwxrwxrwx 1 {user} {user} 16384 Dec 19 04:21 ..
-rwxrwxrwx 1 {user} {user} 0 Jul 20 2019 'Colony S01E05'
-rwxrwxrwx 556 {user} {user} 0 Jul 20 2019 'Impulse S02E01'
-rwxrwxrwx 1 {user} {user} 0 Jul 19 2019 'Prestonwood 191019 HELP! The God of All Comfort.mp4'
metamorphousthe
"It's all about change"
"It's all about change"
Re: Files Won't Delete From Directory
Nope, that's not
Code: Select all
ls -al {file}*
If you want to delete those files but can't type the names correctly, try this:
Code: Select all
rm *
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Your data and OS are backed up....right?
-
- Level 2
- Posts: 86
- Joined: Fri Sep 19, 2008 6:55 am
Re: Files Won't Delete From Directory
I think I understand what you mean now.
The file name has multiple words separated by a SPACE which won't work name-wise in terminal?
The file name has multiple words separated by a SPACE which won't work name-wise in terminal?
metamorphousthe
"It's all about change"
"It's all about change"
Re: Files Won't Delete From Directory
Yup. Spaces are bad news (but see below), you should probably replace them with _ (underscore) or - (minus).metamorphousthe wrote: ↑Fri Mar 20, 2020 10:59 pmI think I understand what you mean now.
The file name has multiple words separated by a SPACE which won't work name-wise in terminal?
If you tried:
rm Colony S01E05
it should treat those as two files, both not found; that's why I wanted you to type
ls Colony S01E05
and ls would also not find them.
But these commands would work: put quotes around the name, or 'escape' the spaces, or use *:
Code: Select all
rm "Colony S01E05"
rm Colony\ S01E05
rm Col*
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Your data and OS are backed up....right?
Re: Files Won't Delete From Directory
Hi,
An unorthodox method that will probably be frowned upon by the experts, but which I have used with success when I have had similar problems, is to boot your system with live Puppy Linux media. Now access the directory containing those reluctant to go files, highlight them and delete them in the conventional way.
An unorthodox method that will probably be frowned upon by the experts, but which I have used with success when I have had similar problems, is to boot your system with live Puppy Linux media. Now access the directory containing those reluctant to go files, highlight them and delete them in the conventional way.
-
- Level 2
- Posts: 86
- Joined: Fri Sep 19, 2008 6:55 am
Re: Files Won't Delete From Directory
$ rm *
rm: cannot remove 'Colony S01E05': No such file or directory
rm: cannot remove 'Impulse S02E01': No such file or directory
rm: cannot remove 'Prestonwood 191019 HELP! The God of All Comfort.mp4': No such file or directory
$ ls -al Colony S01E05
ls: cannot access 'Colony': No such file or directory
ls: cannot access 'S01E05': No such file or directory
$ rm "Colony S01E05"
rm: cannot remove 'Colony S01E05': No such file or directory
$ rm Colony\ S01E05
rm: cannot remove 'Colony S01E05': No such file or directory
$ rm Col*
rm: cannot remove 'Colony S01E05': No such file or directory
I tried to rename Colony S01E05 but it won't rename. I get the return popup:
Sorry, could not rename "Colony S01E05" to "Colony-S01E05": Error renaming file /Colony S01E05: Input/output error
rm: cannot remove 'Colony S01E05': No such file or directory
rm: cannot remove 'Impulse S02E01': No such file or directory
rm: cannot remove 'Prestonwood 191019 HELP! The God of All Comfort.mp4': No such file or directory
$ ls -al Colony S01E05
ls: cannot access 'Colony': No such file or directory
ls: cannot access 'S01E05': No such file or directory
$ rm "Colony S01E05"
rm: cannot remove 'Colony S01E05': No such file or directory
$ rm Colony\ S01E05
rm: cannot remove 'Colony S01E05': No such file or directory
$ rm Col*
rm: cannot remove 'Colony S01E05': No such file or directory
I tried to rename Colony S01E05 but it won't rename. I get the return popup:
Sorry, could not rename "Colony S01E05" to "Colony-S01E05": Error renaming file /Colony S01E05: Input/output error
metamorphousthe
"It's all about change"
"It's all about change"
Re: Files Won't Delete From Directory
To remove ALL files inside that directory:
sudo rm /path-to-folder/foldername/*
Then, to remove that directory (which is now empty):
sudo rm /path-to-folder/foldername
This always works for me, but I'm sure there's a better way.
sudo rm /path-to-folder/foldername/*
Then, to remove that directory (which is now empty):
sudo rm /path-to-folder/foldername
This always works for me, but I'm sure there's a better way.
"Tolerance is the refuge of men without conviction."
"Common sense is not so common" - Voltaire
"Common sense is not so common" - Voltaire
Re: Files Won't Delete From Directory
Or just do if you're sure it does not contain any files you want to keep.
Code: Select all
rm -rf /path/to/directory
Re: Files Won't Delete From Directory
Hardware is broken.Input/output error