The tag has no wiki summary.

learn more… | top users | synonyms

15
votes
6answers
2k views

Why do I have to cd out of a deleted directory?

On my server I have a directory structure looking something like this: /myproject/code I normally have an ssh connection to the server and 'stand' in that directory: root@machine:/myproject/code# ...
-1
votes
2answers
39 views

How to delete a directory from terminal?

I'm trying to delete a directory after a series of events take place. That being said, I need to be able to place this in a file to execute once said events take place.
2
votes
2answers
30 views

Shredding an external HDD

How do I shred the data on an external HDD? I am trying shred "/media/me/New Volume/" but I get failed to open for writing: Is a directory. Why?
0
votes
1answer
42 views

undelete a just deleted file on ext4 with extundelete

Is there a simple option on extundelete how I can try to undelete a file called /var/tmp/test.iso that I just deleded? (it is not so important that I would start to remount the drive read-only or ...
3
votes
2answers
54 views

How to remove Dropbox

I am trying to remove Dropbox from my computer. So far I have done the following: sudo aptitude remove dropbox sudo aptitude purge dropbox But this didn't get rid of it 100% oshiro@debian:~$ ...
3
votes
4answers
106 views

Removing file which doesn't have any permissions and attributes

I have a file on my external hard disk named ._Icon^M.I ended up with this after using my hard disk on old Mac platform machine. I want to delete this file but unable to. For the command 'ls -al' it ...
1
vote
6answers
122 views

Program a file to self-destruct at a given time

Does anyone know whether there is a command in linux that can set attributes to file so that the file can disappear after certain time. For example, if I set one attribute to file as "1/1/2015", so ...
1
vote
0answers
23 views

Most efficient way of purging of 10TB data from SAN? [duplicate]

I want to purge storage data from SAN which accumulates to 10 TB. The OS is linux. The storage is mounted as mount-points on a system for which it is visible I was recommended by a friend to use ...
2
votes
5answers
106 views

How to free space on a completely full volume?

I am using Linux. And within an uncontrolled event, my 4GB system disk is full. When I try to uninstall some program by sudo apt-get purge program-name, it gives me this error: /usr/bin/mandb: can't ...
4
votes
2answers
79 views

Bind mount - unable to delete files to trash

I'm trying to set up shared home directory for two Linux installations and thus I'm using bind-mounts. My user is named dbz and his home directory is /home/dbz. I also have shared directory ...
2
votes
1answer
59 views

Find & Delete directories in .zip files

Question 1 : In many .zip archive files I would like to delete directories anwsering to a name pattern. In a "normal" directory I used : find . -type d -name "pattern" -mtime +30| xargs rm -r Is ...
1
vote
1answer
116 views

Debian 7.3 (stable) with GNOME 3.4.2, new Nautilus accel won't stick

Since I've been using Debian with GNOME 3.4.2 (default version upon installation), I've always used the dconf editor to change the delete accel back to the normal delete instead of <ctrl>delete, ...
2
votes
1answer
80 views

kill process in script while writing file behavior

in my php script which runs as a cron job, I have foreach($sites as $site) { exec('./wkhtmltoimage-amd64 ' . $site . ' somefile.png'); exec('./zopflipng -y somefile.png somefile.png'); } ...
3
votes
3answers
327 views

Bash script to delete a file called index.html recursively

I need a bash script (not sure how to write the actual .sh file) which I could set to be run by cron every minute and that would delete files with the name index.html that are in a specific directory ...
0
votes
2answers
40 views

Machine keeps backups of files that I have already deleted

I recently found out that my machine keeps backups of files that I have already deleted. For example, a file called a.svg that I have deleted in the past, still exists in the directory it was deleted ...
1
vote
1answer
48 views

How to FILTER the files with filename and then DELETE the OLDEST file from there? [duplicate]

I create and keep the following automated backup files e.g.: fruits_29-12-2013.gz fruits_30-12-2013.gz fruits_31-12-2013.gz sweets_01-12-2013.gz sweets_02-12-2013.gz sweets_03-12-2013.gz .. ...
2
votes
2answers
60 views

Why can users delete each others files in this case

I have two users : bob and sally, who resepctively own two files : bob100 and sally100: > ls -altrh /path/to/dir : -rw-r--r--. 1 bob test 0 Jan 7 12:59 bob100 -rw-r--r--. 1 sally test 0 ...
4
votes
1answer
51 views

How to know what files got deleted?

I'm working on Ubuntu 13.04. yesterday from a Windows 7 partition, I accidentally deleted many files. I deleted by pressing shift-del. Is there any way to know the name of the files that got ...
1
vote
1answer
97 views

Recovering free space after zeroing out drive with sfill?

I was following a tutorial showing how to zero out the free space by using sfill . It only occurred to me after the fact that I did this that if the free space is zeroed out, then of course I don't ...
0
votes
1answer
50 views

Which software supports DoD 5220-22-M 7 pass standard for SLES 10.4?

"DoD 5220-22-M 7 pass standard" is a secure deletion method. But what software supports it for a SLES 10.4 64bit?
7
votes
2answers
138 views

what does a “deleted file” entry look like in the journal

I hope I've got this right: A file's inode contains data such as inode number, time of last modification, ownership etc. – and also the entry: »deletion time«. Which made me curious: ...
1
vote
4answers
440 views

How do I delete files with spaces in them in bash script?

this is a three part topic to a two part process that still is not working for me: Objective: to manipulate a filename then delete it the filename has spaces between the words then the dot .ext ...
2
votes
1answer
82 views

Cannot remove file on NTFS partition, event as root

I have a dual boot system, and use a NTFS partition as universal storage between Windows 7 and Ubuntu. Lately, that partition has been throwing CHKDSK prompts on Windows boot, so I thought it was a ...
2
votes
0answers
62 views

Is it possible to import vmail folder from old iRedMail to new iRedMail installation?

Basically, what I did: Copied vmail folder to my local machine. Reinstalled my VPS. Installed iRedMail again. Created same users on the same domain. Question is - can I somehow copy over my old ...
3
votes
4answers
288 views

How can I zero files out inside a VMware image file so that their space can be reclaimed?

is there a command on Linux to remove a file but zeroing it's contents first? so if i do, something like this: rm -rf /var/cache/pacman/pkg/* it would overwrite each file on that directory with 0 ...
1
vote
0answers
260 views

How to recover: Deleted accidently important files [duplicate]

I've accidentally deleted today the /var/www with 2 Joomla-Homepages on it. Is there any possibility to recover all these files? I'm using PhotoRec right know, but the recovered files are named like: ...
0
votes
1answer
61 views

How do I simply recover the only file on an empty disk just deleted? [duplicate]

Usually, the best way to recover a deleted file is to have backups and that, if the backup failed, you should immediately remount the drive read-only. (See this thread: How to recover a file just ...
3
votes
2answers
110 views

Preventing accidental directory deletion. Making an alias that contains options?

I use an alias to prevent me from accidentally deleting files, and I would like to do something similar for directories. For files, I have the following added to my .bashrc: alias rm="rm -i" I ...
0
votes
0answers
102 views

can not delete a file that has been memory mapped until all dirty pages are written

I am memory mapping files from java which wraps the mmap kernel function, it all works fine except that when I close my program down and try to delete the memory mapped file the delete hangs for ages ...
1
vote
0answers
40 views

In Gnome file browser, fall back to the parent directory when a directory is deleted

I am using CentOS Release 6.4(Final), with Kernel Linux 2.6.32-358.11.1.el6.x86_64, and GNOME 2.82.2. I have enabled “Always open in browser” option in the File management preferences. I have a ...
1
vote
1answer
310 views

Where is the trash folder in FreeBSD / PCBSD?

I'd like to delete - undelete files using the shell in PCBSD. But... I don't know where the "trash" folder is. Can anyone tell me?
0
votes
0answers
29 views

Ubuntu directory permissions - Sticky bit - Prevent deletion of a file [duplicate]

I have a database called oss-pwds.kdb located in a folder /keepassx. This is a password database that I use with the KeePassX software. I want to allow all members of the "oss" group to open and ...
3
votes
3answers
97 views

Delete files except n files with the “bigger” name?

I want to create a shell script that deletes old release files except last n files. In other words, only mantain last n releases when I deploy a new release. File names have this format: ...
0
votes
1answer
89 views

Unable to delete a directory even as root

I am unable to delete a directory even as root. The command rm -rf kdyiyv.pif returns nothing. Then I tried the command, touch kdyiyv.pif for which there was an error: touch: setting times of ...
2
votes
2answers
237 views

Rsnapshot, controlled file deletion

I have an Rsnapshotting local server that takes snapshots of folders of miscellaneous computers within the local LAN. There are daily, weekly, monthly and yearly snapshots. So somebody puts a file ...
1
vote
1answer
214 views

Getting back rsync's deleted files [duplicate]

I accidentally rsync-ed to a server using the delete attribute when I shouldn't have. Is there any chance of getting the data on the server that rsync removed.. back?
0
votes
3answers
2k views

how to delete temp and log files with terminal on vps?

I'm kinda pretty new to this but anyone know how to delete any temp and log files or these kind of files on vps with terminal? I'm runnin debian on the vps. I'm troubled since I can't locate those ...
3
votes
3answers
176 views

file mass deletion

I would like to delete all the txt, xls,pdf files in a directory as well as its sub directories. I would like to save everything else. find . -type f ! -iname '*.xml$,.png$,.jpeg$,.gif$,' -delete ...
2
votes
1answer
262 views

Script to check a folder, print the files then delete those files

I am looking for some guidance on creating a script that will check a specific folder, print all documents (if any) and then delete those documents. I would also like to run this script as a cron job. ...
5
votes
2answers
8k views

Find and remove large files that are open but have been deleted

How does one find large files that have been deleted but are still open in an application? How can one remove such a file, even though a process has it open? The situation is that we are running a ...
6
votes
3answers
1k views

How can I delete a folder with lots of subfolders fast?

I have a folder with 266778 subfolders. How can I delete it? I have tried cd ~/.local/share/Trash/ sudo rm -rf * but it takes much time. After 1 minute 25 seconds real time and 0.072 seconds user ...
4
votes
3answers
118 views

Control how linux deletes files

What exactly happens when an application deletes a file? Is there any way to control this behavior? Basically I want to shred instead of rm in all cases, but of course applications do not make calls ...
11
votes
2answers
372 views

How can I be sure that a directory or file is actually deleted?

I know that most files, when deleted, aren't actually removed from the disk, and can be recovered later. How can I ensure that a directory I had deleted will actually be removed from the disk? Are ...
20
votes
2answers
3k views

How do I remove a file with no permissions?

A hacker has dropped a file in my tmp dir that is causing issues. Nothing malicious except creating GB's of error_log entries because their script is failing. However, the file they are using to ...
6
votes
6answers
834 views

How to prevent a mistaken rm -rf for specific folders?

I think pretty much people here mistakenly 'rm -rf'ed the wrong directory, and hopefully it did not cause a huge damage.. Is there any way to prevent users from doing a similar unix horror story?? ...
0
votes
2answers
1k views

How to find last deleted files on OpenSuse?

I didn't lock the screen on my OpenSuse Linux and let my girlfriend do all evil things when I was sleeping. Is there a way to find out if she deleted any files from my PC? I was looking at the "Date ...
0
votes
3answers
1k views

vim backspace not working normally

The Backspace key is not working as expected in vim and also in vi. It is working as the Delete key, and Delete key is deleting the char, but instead something wierd happens. But, for now, I am trying ...
2
votes
2answers
694 views

How to prevent users from deleting a directory?

I tried "chattr +i DIRNAME", it's great, but I cannot create files in the DIR after chattr. What else are there to prevent users from deleting a Directory? root@HOST ~] mkdir test [root@HOST ~] ...
11
votes
4answers
6k views

Delete last line from the file

I use sed to quickly delete lines with specific position as sed '1d' sed '5d' But, what if I want to delete the last line of the file and I don't know the count of lines (I know I can get that ...
2
votes
5answers
326 views

How to delete empty comments with sed?

I want to delete empty Java comments like the following: /** */ /* * * * */ I tried it with sed, but the following deletes all comments, not just the empty ones: sed -r ...