Score:0

Why I can not remove neither folder nor its content?

cn flag

Here is the folder and its content.I don't understand why I cannot remove these files and this folder. ls -ltr results in:

total 16672704
-rwxrwxrwx 0 17064381527 Eyl  2 18:10 101737-31-HO-EO_L03_99_merged.bam
-rwxrwxrwx 0 8395632 Eyl  2 18:10 101737-31-HO-EO_L03_99_merged.bam.bai
-rwxrwxrwx 0 4503304 Eyl  2 19:52 101737-31-HO-EO_L03_99.g.vcf.gz
-rwxrwxrwx 0 49778 Eyl  2 19:54 output.txt

sudo rm -rf * results in:

rm: cannot remove '101737-31-HO-EO_L03_99.g.vcf.gz': No such file or directory
rm: cannot remove '101737-31-HO-EO_L03_99_merged.bam': No such file or directory
rm: cannot remove '101737-31-HO-EO_L03_99_merged.bam.bai': No such file or directory
rm: cannot remove 'output.txt': No such file or directory

Using sudo rm -rf merged_bam_bai to delete the whole folder doesn't help either.

My Ubuntu version is 18.04.5 LTS

Zeiss Ikon avatar
cn flag
Have you tried when `merged_bam_bai` isn't your working directory?
Baran Aldemir avatar
cn flag
@Zeiss Ikon Yes I did. It says rm: cannot remove 'merged_bam_bai/': Directory not empty
Baran Aldemir avatar
cn flag
Nope using sudo doesn't help. @TBr
Baran Aldemir avatar
cn flag
@TBr These files are created by using GATK bioinformatics tools. And this is the first time this has happened. And yeah I used these tools with nohup as gnks user.
Nmath avatar
ng flag
Please do not post pictures of your terminal. Copy-paste and use code fences for formatting. Put three back ticks on the line before and three back ticks on the line after code blocks. Thanks
Baran Aldemir avatar
cn flag
@TBr Trying to delete each file independently doesn't work either.
Baran Aldemir avatar
cn flag
@TBr Yes this is not the first time. I run this process to get such files many many times.
Zeiss Ikon avatar
cn flag
I wonder if this might be related to one file being about a hundred times the total size of all the files?
v010dya avatar
gb flag
What is the filesystem that this is on?
raj avatar
cn flag
raj
That `ls -l` output is strange. After the permissions field (`-rwxrwxrwx`), there is a number of 0 links to the file (there should be at least 1), and there are no owner/group fields. Is this directory maybe some network share? If yes, it may be mounted read-only, that's why you can't delete.
Baran Aldemir avatar
cn flag
Somehow problem has been solved. I am not sure but maybe some process was still running in the background and when it stopped files got removed. I don't know about the filesystem.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.