Questions tagged [rm]
75 questions
1
vote
0 answers
Composer runtime error when deleting subdirectories
I am running 'composer install' on my server, and then using the script feature to delete all subdirectories called '.git' but I am running in the following composer error.
Delete all .git dirs
find: `vendor/ajbdev/authorizenet-php-api/.git': No…

Jen Zhang
- 111
- 1
1
vote
1 answer
Ubuntu server: Delete first folder in directory
How can I grab the first subfolder in a directory and delete it?
I found a script to monitor the free diskspace.
It sends an alert email if space runs low, but I want to also delete some unneeded stuff.
I have a backup folder where I save daily and…

Martin
- 220
- 3
- 9
1
vote
1 answer
How to increase deletion speed of several folder
I have a script containing about 420k lines of "rm -rf" command like which where generated using a "find" statement. Each pdf's folder is containing between 1 and 30 files (no subfolder).
rm -rf /2012/128/211503/pdf
rm -rf /2012/128/212897/pdf
rm…

DevOps
- 720
- 5
- 16
1
vote
2 answers
Can't delete corrupt files on Linux
So I got hit by a script kitte... Fortunately the box is Ubuntu and was able to replace w/ binaries from a comparable system, however,
Some of the files I couldn't delete, and am still stumped on this. The hijacked files are sitting in the /_bin…

quickshiftin
- 2,125
- 5
- 27
- 41
1
vote
2 answers
Pausing deletion of directories if load is high
I have a list of directories that I'd like to delete. However when I do them all at one, load spikes on the box. Does anyone have an example of a script that would wait until load was under a certain level before proceeding with the deletion…

ckliborn
- 2,778
- 4
- 25
- 37
1
vote
3 answers
Very slow rm -rf on OpenVZ VPS with Debian 6 installed
I recently bought OpenVZ VPS and compared to a dedicated servers rm -rfoperation takes considerably longer to complete (about 4x - 5x longer). This is case even if there is one big file as opposed to many small files in directory. The server have…

Andrew
- 135
- 3
1
vote
2 answers
Cannot delete a dir via SSH: etc/rc.d/init.d/functions': Operation not permitted
I am attempting to delete a backup directory on MediaTemple's (dv) via SSH. The directory is "old" and contains the entire server contents from OS level that (mt) backed up there after my server was hacked.
I want to remove it in case there's any…

Jay
- 13
- 3
1
vote
2 answers
How do I delete a directory that has many subdirectories?
I have a directory with many subdirectories. I tried doing
rm -rf mydirectory
but it was still running after 1 hour. I have tried getting the number of subdirectories with
ls -l . | egrep -c '^-'
but it hasn't finished after 30 minutes.
Is…

chris
- 111
- 2
1
vote
6 answers
Linux console - prevent accidental deletion of files
Yesterday I deleted /etc by mistake.
I remembered I found a software to prevent this kind of things but I can't find it anymore. I don't remember the name and actually Google is not helping.
It had a configuration file with a list of…
Daniele
0
votes
1 answer
Glob match recursive delete directories except a certain directory
How can I delete all directories recursively where the name starts with app-deployment-* except a particular directory with name app-deployment-245a578. I.E. delete all directories using a glob match but don't delete a particular known named…

Justin
- 5,328
- 19
- 64
- 84
0
votes
2 answers
rm -rf until success
I have a deployment script that removes all files in a tmp folder before continuing, but sometimes during the deployment, a process will use one of the tmp files, making the rmcommand fail. This is how my script looks like
rm -rf app/tmp
tar -xf…

santiago arizti
- 435
- 6
- 16
0
votes
3 answers
Ubuntu rm not deleting files
My colleague and I have been struggling with deleting a directory and its contents.
We are working on a new version of our websites source code on Ubuntu 8.04 (dir: /var/www/websites), what we want to do is delete the websites directory and…

Ben Everard
- 599
- 3
- 7
- 22
0
votes
1 answer
CentOS: eror when removing file: "rm: cannot remove '.viminfo': No such file or directory"
I have a file named .viminfo in home directory. I can see that the file is there by ls -lh:
$ ls lh
...
drwxr-xr-x. 2 mt1022 1091 4.0K Oct 12 2016 .vim
-?????????? ? ? ? ? ? .viminfo
-rw-r--r--. 1 mt1022 1091 305 Nov…

mt1022
- 101
- 4
0
votes
1 answer
rm: cannot remove ‘[name].rmanbkp’: Input/output error
I'm using Red Hat Enterprise Linux Server release 7.2 (Maipo) and have vgroup mount to folder is: /dev/mapper/vg_oradata-lv_oradata 886G 636G 206G 76% /bak.
Now, In folder /bak have a some file cannot remove with info:
[root@bak bak]# ls…

Richbest
- 101
- 1
- 4
0
votes
1 answer
Why remove some files is so slow?
While tidying up some folders I saw that deleting some files is very slow :
$ ls -lah a/
-rwxrwxrwx 1 user user 4 Nov 17 12:31 af8048e4aec858a02ac48119545413dd
$ time (rm -v af8048e4aec858a02ac48119545413dd)
removed…

JazZ
- 231
- 2
- 4