Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [rm]

rm is the POSIX command to remove and delete files or directories.

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, ...
Guillem Senabre's user avatar
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?*'...
Giacomo M's user avatar
  • 143
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 ...
Meinrad's user avatar
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:...
Richard's user avatar
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 ...
user avatar
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....
JSS's user avatar
  • 1
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 ...
אורי orihpt's user avatar
-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 ...
KansaiRobot's user avatar
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 ...
yokus's user avatar
  • 45
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?
monstar's user avatar
  • 133
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. ...
Vincent's user avatar
  • 121
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 ...
souch's user avatar
  • 113
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/...
user985675's user avatar
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 ...
Sisyffe's user avatar
  • 11
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 ...
James Regan's user avatar

15 30 50 per page
1
2 3 4 5
18