Questions tagged [rm]
rm is the POSIX command to remove and delete files or directories.
257
questions
1
vote
0
answers
59
views
"Directory not empty" and "Input/output error" when "cd"/"ls" into certain dirs or "rm -rf" certain files of a mounted storage drive
I have a storage device (sda) where I stored some backups in its partition 1 (sda1). Disgracefully, I killed the process (rsync) that was backing up data into the mounted storage device and, I guess, ...
0
votes
2
answers
254
views
Remove all files with name starting with single quote
I need to delete all files with these names (the quotes are part of the name):
'index.html?some-query-string'
I tried with:
rm \'index.html?*\'
I get this error:
rm: cannot remove ''\''index.html?*'...
0
votes
1
answer
429
views
sudo rm -rf permission denied
I accidentally copied my entire disk with rsync -a / ... to my backup server. When trying to delete this backup with sudo rm -rf backup_dir I get a permission denied error on some sub directories of ...
0
votes
0
answers
27
views
Why does "sudo rm -r /example/*" return "No such file or directory" when content exists? [duplicate]
I am using an Amazon Linux 2 distribution and trying to delete the contents of /opt/atlassian/jira/work directory using the following command
sudo rm -r /opt/atlassian/jira/work/*
The command returns:...
0
votes
1
answer
338
views
How to find and delete folders that are 15 days older using cron jobs in Truenas Scale?
I have security camera in my home it upload recorded videos to my Home NAS every one hour time intervals which is powered by Truenas Scale Operating System now all the footage are stored in my NAS I ...
0
votes
0
answers
44
views
How to skip an rm command without erroring out of the script [duplicate]
My SFTP script errors out if the target file in my "rm xxx" command doesn't exist. Sample script:
OPEN sftp://pwd@host
cd from_ar
rm file1.edi -f
rm file2.edi -f
rm file3.edi -f
rm file4....
0
votes
0
answers
200
views
Deleting folders using rm -rf does not free up space
I am trying to re-install macOS on my iMac.
My iMac worked perfectly, before I upgraded macOS Ventura (It was a minor upgrade, I was already on Ventura). After I did a regular update, I logged into my ...
-2
votes
2
answers
1k
views
What does rm -R do?
First, googling for things like "-R", is useless. All kinds of unrelated answers come out. I know what rm -rf does, but what does rm -R does? (specially rm -R <directory>)
(I actually ...
1
vote
2
answers
265
views
What happens to a file/directory after you remove it with rm -rf but is still open in VS Code or anorhet app?
This happens me a lot. I remove directory with rm -rf but see it is still open in an application such as VS Code.
My concern is that does it cause some folders to be copied for VS Code to be still ...
3
votes
1
answer
961
views
I accidentally ran `rm -rf /*` on my wsl, what should i do
I accidentally ran rm -rf /* on my wsl (with root permission). and i rebooted and it became unusable. What should I do?
10
votes
4
answers
5k
views
Recover a file after shred command
Let's say I have some sensitive files in my computer and I want to completely delete them so that no one can ever retrieve them.
For that, I can use the rm command, but it's still easily recoverable. ...
1
vote
1
answer
149
views
In a bash shell, is `rm -rf ./*` better/safer than `rm -rf *`
In a Linux bash shell, I saw someone typing rm -rf ./* because he wanted to remove every file and folder of the current folder. I wonder what is the benefit of typing ./* rather than * ?
I think it is ...
1
vote
0
answers
346
views
UNremovable files/directory
opensuse leap 15.4 on asus l210
I have unreadable/unremovable files on a usb fs. Could someone kindly explain the following sequence of commands, and what I might do to get rid of the problem?
/media/...
0
votes
1
answer
176
views
Cannot remove a symlink recursive
During a delete of a backup, somehow the rm -rf got stock and couldn't delete a symlink.
Now, my folder looks like that:
$ ls
armips-master # folder
$ cd armips-master
$ ls
armips
$ readlink ./armips
...
0
votes
0
answers
171
views
I can't delete some files on my hard drive on ubuntu, says they don't exist, when they do
I use Ubuntu 20.04 and a folder containing some images was saved on my PC, but when I tried to delete it, I get this error. Same on terminal.
I noticed that the folder now has a thumbnail with a ...