0
votes
1answer
32 views

How can I delete the oldest directory in a directory?

I am writing a backup programm, and I need to execute a bash command to delete the oldest directory in a specific directory. I have found this command to print the oldest directory: find -type f ...
2
votes
1answer
38 views

Linux: Deleting old log files recursively

I have a directory /home/projects/ with several nested sub-directories. How to recursively delete all files older than 1 week inside any logs directory starting from /home/projects/ ? A schedulable ...
2
votes
2answers
86 views

Cannot delete folder or files inside

I have a rather strange problem. I have encountered a folder with a file in it, that I can neither see or delete. This is, I believe, a rootkit and I am desperate to get it off my machine. I am logged ...
0
votes
1answer
294 views

How to remove large number of files/folders in linux

We are using hadoop to split a table into smaller files to feed to mahout, but in the process, we created a huge amount of _temporary logs. we have an nfs mount for the hadoop volume so we can use ...
0
votes
1answer
388 views

How to delete all files inside public_ftp folder and its sub folders which are older than X days using Cron Job?

I want a way to run Cron job (automatically daily) on server that will delete all files only (not folders) which are older than X days from today's date, in the public_ftp folder and all its sub ...
1
vote
1answer
311 views

ubuntu remove file with full permissions

I created a file in the /tmp/ directory. The file is owned by mysql user and has full permissions, i.e. -rw-rw-rw- 1 mysql mysql 16 Sep 23 12:44 artists.csv Now I want to delete it, but get ...
2
votes
1answer
179 views

Delete all file except some in bash, without cd to the directory?

I need to make a daily cleanup in a download directory. I have saw this question and tested the answer rm !("test 1"|"test 4") It work great, but require to have cd to the directory before. Since ...
0
votes
2answers
97 views

Need to delete a file I accidentally labeled in quotes in Linux [duplicate]

I have a file which I wrote and not thinking put the actual filename in single quotes like this: 'filename' When I try to remove it using rm -f 'filename' it does not recognize that it is there I ...
2
votes
1answer
255 views

Recursively delete all .exe files with the same name as the containing folder

I want to delete all .exe files in the current folder and all the sub-folders. I read that find . -name "*.exe" -exec rm -f '{}' \; will do, but I want to do the delete only if the container folder ...
1
vote
2answers
157 views

rm -r: exclude certain subdirectories

The problem I have a directory structure, e. g. something like this (here trailing slashes represent folders): ./A ./B/A/A ./B/A/B ./B/B/ ./B/C ./C/ And I need to recursively remove everything ...
0
votes
1answer
66 views

Irregular time-delay while deleting files

I have a very general question. I am running on Red Hat Enterprise Linux Workstation release 6.2 (Santiago) in a network where my workstation from time to time needs an annoyingly long period to ...
0
votes
1answer
64 views

How to delete files carved by Scalpel?

Scalpel is a Linux utility which is traditionally used to recover files on the basis of file signatures, that is in a manner that is unaware of the file system. Can we also use it for doing the ...
0
votes
1answer
138 views

Does interrupting rm command with keyboard delete any file?

I'm running Fedora 13 (Goddard) and when I was recursively removing a directory I noticed I had some files there I couldn't lose, so I interrupted the process with ctrl+c. Now I don't know if I lost ...
1
vote
0answers
242 views

Permanently delete using delete key - Linux

How can I set the Delete key to do the same thing as Shift + Delete: permanently delete files, rather than sending them to the trash can? I'm using Linux Mint 14, a Debian distro, with the Cinnamon ...
0
votes
1answer
371 views

RSync move files to a different directory if they were deleted on the server

So right now I use rsync to synchronize files with a server. Sometimes the files on the server are deleted (I know about the --delete option and I do not use it) and those files are left in my local ...
1
vote
3answers
672 views

Linux, How to delete a folder with more than 1 million files?

I'm working on a website for a client, and I just see a folder containing more than 1 million cache files. I need to delete him, but i can't, i have this message : Argument list too long I started ...
6
votes
2answers
726 views

Debian - deleting thousands of files

I have machine running Debian Squeeze with apache, mysql, php... In one of the directories there are some other dirs and way too much files more than 500k files, I tried deleting via WinSCP but it ...
7
votes
3answers
11k views

How to find which files and folders were deleted recently in Linux?

I am having one particular folder (/home/sam/officedocuments) which is having hundreds of folders and files. I think I deleted some files and folders by mistake but I'm not sure. How to find which ...
1
vote
2answers
546 views

How to delete a file containing dots and backslashes in Fedora 17

I'm using Fedora 17 and I generated a folder named .\data\ from code How can I delete this file from the command line?
1
vote
2answers
543 views

how to delete **this** file

this one is odd: I have two partitions on my computer, one for linux (ubuntu 12.latest) and one for window 7. I use grub to choose the system to boot. I made a Screenshot in Linux and saved it on the ...
4
votes
1answer
5k views

Deleting files doesn't free space

I've got a disk formatted as ext3, which was filled completely. I'm attempting to free up some space on it by deleting files, but it's not working. I can rm the files, and they don't show up in the ...
-3
votes
1answer
113 views

How can I delete files that have a size of 0 in bash? [duplicate]

Possible Duplicate: Bash Find Files with zero size and delete files with different extensions How can I delete files that have a size of 0 in bash?
2
votes
1answer
4k views

Delete all files inside a directory over FTP with BASH

I try to delete all files from a directory on a remote FTP server with BASH. I was only able to delete the files and the folder, but not just clearing a folder out.. :/
0
votes
1answer
173 views

Identify files that would be deleted when removing an rsync --link-dest directory?

I have a Time Machine-style backup system set up on my NAS (running BusyBox v1.16.1), using rsync --link-dest as described here: http://blog.interlinked.org/tutorials/rsync_time_machine.html Is there ...
0
votes
1answer
75 views

already opened files in a directory can still be saved after the directory is deleted - Linux

This is annoying feature of Linux. If I opened a file in a directory and then delete the directory, and copy another directory having the same name to the same place, I can still edit and save the ...
3
votes
2answers
6k views

Root Can't Delete Folder It Owns

Platform: CentOS 6.2 Shell: tcsh .............................................................................................................. EDIT 2 Brian Swift has pointed out a workable solution. ...
-1
votes
1answer
728 views

Will deleting partitions affect my hard drive in any way?

I installed a Suse partition of around 200 Gigabytes on my hard drive, primarily running Windows 7. I am sick of Suse's crap, and just want to get rid of the OS and get that partition back for ...
2
votes
3answers
2k views

How to delete visible Desktop.ini, Thumbs.db and album art from My Music

How do I delete album art, desktop.ini, and thumbs.db from my music folder in Windows 7? I can see all of these files because I took the hard drive from my old computer and put it in my new one. It ...
1
vote
3answers
316 views

Script to keep specific directories that contains a .txt file and deletes the files from the other directories without the specific .txt file

I am almost done with the script but this outputs directories. What I would like is to have an output of files. Anyway one of you guys wanna help me out? :) #!bin/bash ( find /testftp/* -type d ; ...
0
votes
2answers
1k views

How can I use the find command to remove directories without eliminating certain subdirectories?

I am trying to modify the following command in a script that removes directories based on age. Example directories would be the following: /a/b/c/2011/11/11 /a/b/c/2011/11/11/12-ACD-1234 ...
1
vote
4answers
8k views

Operation not permitted error when deleting as root

I got into a weird situation. I got a 1Tb portable HD filled with some contents. It was used in Windows and as always packed with virus. I tried deleting some folders as root. But the following error ...
2
votes
1answer
1k views

How do I temporary delete files with the command line?

I've tried to alias rm with rm='mv $1 /tmp/' to no avail. How can I temporary delete files with the command line? I want to replace the rm command with the mv command to not delete my files and ...
1
vote
2answers
1k views

How can I remove a directory with rm - rf?

I try to remove a folder with rm -rf foldername … but it says rm: cannot remove folder :is a directory. What's wrong?
1
vote
2answers
807 views

Deleting Linux partition

I am currently running a dual boot machine with Ubuntu 11.04 and Windows Vista. Is there any way I can delete the Linux partition and Grub boot loader without affecting the Windows partition at all? ...
23
votes
4answers
6k views

How to lock a file against deletion but still make it writeable?

I want to make a file locked against deletion but still be writeable. How do I do this? The file in question is a truecrypt volume as a file on a NAS SMB Network share, so I don't want to ...
5
votes
1answer
2k views

Two commands to move files to trash. What's the difference?

trash-cli provide a trash command, and gvfs-bin provides a gvfs-trash command that move files / directories to the trash can. Is there an important difference between these two commands?
2
votes
2answers
2k views

What are the techniques for securely erasing data in Linux? [duplicate]

Possible Duplicate: How to wipe free disk space in Linux? This question is inspired by What is the best tool for file-shredding on a memory card?, in which brice recommended the simple ...
2
votes
3answers
541 views

In GNU/Linux, how to restrict deletion of files and directories owned by a user to a super user only?

In GNU/Linux, how can directories be set such that the owner can only add/read files/directories to/from them but only a super user can do any deletion in that structure? Consider this scenario: You ...
0
votes
3answers
810 views

Delete File with SSH Access on Linux

I have a VPS. I want to delete some specific folder inside. /var/BACKUP 01 I want to delete all files in BACKUP 01 How can I do it with SSH access? I'm using linux,please type a command here.
1
vote
2answers
432 views

Force delete a directory

I have a FAT32 SD card with a file on it, that, viewed in Windows the filename consists of a long string of nonsense. Viewed in my Android phone's Linux terminal, ls -a shows nothing in the ...
6
votes
4answers
2k views

How to recover deleted file if it is still opened by some process?

$ cat important_file > /dev/null & [1] 9711 $ rm important_file $ killall -STOP cat [1]+ Stopped cat important_file > /tmp/p $ ls -l /proc/`pidof cat`/fd/ total 0 ...
1
vote
1answer
380 views

Extract executable/script from memory in (Ubuntu) Linux

Okay, on Linux, when I delete a running executable or script, it usually (for me, pretty much always, but I don't know if it will work in every case) continues to run without any problems. So I've got ...
0
votes
1answer
227 views

Deleted files recovery

I was working on my Ubuntu lab machine and unconsciously deleted the project files I was working on. I have been working on the project for the past 10 days. Is there a way to restore the files? I ...
6
votes
5answers
12k views

Bash script to keep last x number of files and delete the rest

I have this bash script which nicely backs up my database on a cron schedule: #!/bin/sh PT_MYSQLDUMPPATH=/usr/bin PT_HOMEPATH=/home/philosop PT_TOOLPATH=$PT_HOMEPATH/philosophy-tools ...
7
votes
4answers
2k views

Recover open but deleted file on Linux using ln instead of cp

Say I have a file that's downloading (from a source that's hard to re-download from), but accidentally deleted from the filesystem namespace (/tmp/blah), and I'd like to recover this file. Normally I ...
6
votes
3answers
6k views

How to delete file with this name on linux: -]???????q

Somehow a file named -]???????q got created on my terminal. I tried rm -f "-]???????q" (in double quotes), but it did not get deleted. (Error:: rm: invalid option -- ]). How do I delete it?
2
votes
3answers
404 views

How to use “rm” to remove files with a “:” in them?

I am using Ubuntu 10.04, and I have a directory with a bunch of files. We changed the naming scheme of the files a while ago, and now I want to delete all the old ones. New Name scheme: ...
1
vote
1answer
1k views

How do I remove someone else's subdirectory from under my directory?

I was sharing files with a coworker on a Linux server, and he added some new files. Now we've moved the files somewhere else, so I'd like to remove the old files. However, when my coworker added his ...
3
votes
2answers
778 views

Delete Directories smaller than x

How can I delete Directories which are smaller than, say, 1000 KB? I already have a file list from the command: du -sk * | sort -n > sort.txt but I don't know how to proceed. ++++++++ ...
0
votes
0answers
156 views

How do you delete an iFolder from iFolder admin interface

There are only two buttons at the bottom of the screen "enable" and "disable". When I check the box next to an iFolder one of them is lit (depending on what the state of the folder is)... but there is ...