1
vote
1answer
45 views

How to delete special character in linux

By mistake I made a file with the name \. How do you delete something like that? I've tried rm --\ rm "\" rm -- -\and nothing seems to work. I bet it's so simple but I'm stumbled - any suggestions?
6
votes
3answers
342 views

How to keep subtree removal (`rm -rf`) from starving other processes for Disk I/O?

We have a very large (multi-GB) Nginx cache directory for a busy site, which we occasionally need to clear all at once. I've solved this in the past by moving the cache folder to a new path, making a ...
1
vote
5answers
186 views

How to remove a file where the file name has utf-8 character issues

I want to remove a file from a server via bash rm command. This is a sample file Test_ Mürz.jgp. How would one go about removeing files with such chars issues in the filename on a grand scale ... ...
1
vote
1answer
67 views

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 ...
1
vote
2answers
173 views

rm + how to remove file with special Characters [duplicate]

I have this file in my linux machine: ----------9976723563nneh4_-----192.9.200.4 I try to delete this file but I cant as all see here: what need to add to rm in order to remove this file ? rm ...
0
votes
3answers
407 views

User can't remove symlink which owns

I'm trying to remove symlink, although I have appropriate permission, the operation is denied (the user is called capistrno): capistrno $ rm -f /var/www/app/current rm: cannot remove ...
0
votes
2answers
869 views

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 ...
3
votes
4answers
286 views

rm intermittently causes disk to lock up

I have encountered this extremely strange problem on two servers now, both running CentOS5, both of them ext4. One is a SSD, the other is a regular hard drive, both SATA without RAID. The issue is ...
1
vote
2answers
638 views

How to delete files quicker than rm -rf? [duplicate]

Possible Duplicate: Millions of files in php’s tmp error - how to delete? Is there any way how to delete folder/files quicker than with command rm -rf? It seems my disc is filled with ...
0
votes
2answers
80 views

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 ...
3
votes
2answers
343 views

How does `rm -rf` work

When I try rm -rf on a directory which has a lot of subdirectories and/or files and which is mounted with SSHFS, then I takes a while to execute. Is it normal ? I would like to know how rm -rf works ...
2
votes
3answers
300 views

Recover data from EXT3 filesystem

Our junior sysadmin accidently deleted some of the directories. Can anyone please suggest any free/proprietary application to recover files from an EXT3 filesystem (RHEL 5.x) ?
87
votes
24answers
25k views

How do I prevent accidental rm -rf /*?

I just ran rm -rf /* accidentally, but I meant rm -rf ./* (notice the star after the slash). alias rm='rm -i' and --preserve-root by default didn't save me, so are there any automatic safeguards for ...
2
votes
2answers
3k views

Is there a way to delete 100GB file on Linux without thrashing IO / load?

I have a huge log file I need to delete on a production web server. I'm worried it'll bring the system to a crawl if I rm it on Linux. Any brilliant ideas? Update: Filesystem: ext3 Partition: /var ...
1
vote
4answers
820 views

Cannot remove or list directory (ls or rm) Linux - Debian

I have a log file directory at /var/log/apache2/vhosts on a Debian dedicated server. Every day I split the main access_log into respective vhostname.com_access_log files in /var/log/apache2/vhosts In ...
2
votes
2answers
1k views

Delete files created 5 mins or earlier in a folder

On CentOS, how can I delete files which are created 5 mins ago or earlier in a folder? Thanks!
5
votes
3answers
121 views

directories with two one dot (.) entries

I'm trying to clean up my lost and found, and I've managed to remove most things, but I'm left with "almost" empty directories, like: lost+found/#14042862: total 1324 dr---wx--- 2 76040 43010 ...
1
vote
2answers
1k views

Mongodb grew to 850GB, disk has zero bytes left!! I rm 9GB file but still have 0 disk space! How can I reclaim the bytes? (urgent)

Woke up this morning to find out MongoDB grew to all available disk space for some reason. I cannot repair the db to compact it as i have no space left. I can't even start postgres to remove an old ...
1
vote
2answers
575 views

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 ...
5
votes
9answers
964 views

Best practices to prevent 'rm -rf /' in bash scripts

It's well known fact that extra space in env.variable can lead to deletion of / directory in bash script. #!/bin/bash ... rm -rf /$MYPATH if $MYPATH contains values like " dir" or "dir /" it will ...
1
vote
6answers
871 views

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 ...
21
votes
10answers
18k views

How to make `rm` faster on ext3/linux?

I have ext3 filesystem mounted with default options. On it I have some ~ 100GB files. Removal of any of such files takes long time (8 minutes) and causes a lot of io traffic, which increases load on ...
3
votes
5answers
324 views

Deleting files in Linux

I need to find all files matching a certain criteria and delete them - here's a snippet: /var/www/somesite/releases/{many directories}/tmp/attachment_fu I'd like to find all files in any ...