Questions tagged [delete]
The delete tag has no summary.
279 questions
-5 votes
1 answer
64 views
Impossible delete install disk macOs.app [closed]
I'm trying to delete "Install macOS Mojave.app" from my Mac using the terminal command sudo rm -r or rm -rf, but it reports root error/illegal option/directory permission restricted, etc. ...
-4 votes
6 answers
268 views
Perl or sed script to remove a specific content of a file from another bigger file
I have a file (FILE1) with some repeated sections as below (example): LINE 1 ABCD LINE 2 EFGA LINE 3 HCJK REMOVE LINE11 REMOVE LINE12 REMOVE LINE13 LINE 4 ABCDH LINE 5 EFGAG LINE 6 HCJKD REMOVE ...
6 votes
2 answers
1k views
Deleting a file before it has finished downloading
Today I downloaded a large file using wget, but I accidentally deleted it before it had finished downloading. However wget continued to download the file until it had finished, but there was no file ...
0 votes
0 answers
102 views
Not able to modify inode metadata
I am working on a ext4 file-system tool that aims to delete files such that they are not recoverable later on. My goal is to clear the inode metadata of a deleted file, but despite my efforts, the ...
0 votes
1 answer
136 views
Deleting a directory
I am working through a tutorial - The Linux Command Line for Beginners - and I want to delete my work so far and start over. I have a directory called tmp within the root directory which has a solid ...
3 votes
3 answers
299 views
Find and delete files from unix directory of multiple patterns
I need to delete files from a unix directory having patterns like 'bkp', 'backup', 'bak'. Basically I want to delete all the backup files. Files in the directory: A001.txt_bkp A001.txt A002.csv_backup ...
0 votes
1 answer
154 views
Why does "find . -type d -empty -mtime +7 -delete" produce "No such file or directory" error messages?
I've found similar questions being answered, where the find command encounters errors deleting files. However, the most similar question with an answer on Stack Exchange is regarding the find -type d -...
0 votes
2 answers
335 views
To make 'rmdir' and 'find -delete' ignore '.DS_Store' files
On macOS, there is a hidden file .DS_Store in some directories (well, in most of them). The problem with .DS_Store files is that rmdir and find . -depth 1 -type d -empty -print -delete don't delete ...
1 vote
1 answer
1k views
Delete files in Multiple Folders older than 30 days
I have a root directory: /opt/abc/logs/EXPORT inside of that directory, I have 17 other directories /opt/abc/logs/EXPORT/1 /opt/abc/logs/EXPORT/2 /opt/abc/logs/EXPORT/etc /opt/abc/logs/EXPORT/17 ...
0 votes
0 answers
110 views
Deleting incremental backups created with rsync and symbolic links: recursive effect?
I am doing incremental backup according to the following example found there: https://linuxconfig.org/how-to-create-incremental-backups-using-rsync-on-linux #!/bin/bash # A script to perform ...
0 votes
2 answers
154 views
Delete certain files from specific date in linux [duplicate]
I need a command how I can delete files from a folder with specific date. Like I want to delete files before 20 April from a folder on /home/FTP and file types are mp4.
6 votes
1 answer
46k views
How to clean up a Linux system to free up disk space?
What are some generic ways to free up lots of storage space without deleting personal files? I'm doing a distro upgrade (Debian11->12) and it needs lots of disk space on the root partition / which ...
1 vote
1 answer
156 views
After deleting "database-wal" file from kactivitymanagerd which suddently had a size of several GBs disk space is not freed up
After upgrading to Debian 12 with KDE multiple issues appeared. The following was the most problematic: A database-wal file with a size of multiple GB appeared and I had to delete it like so rm ~/....
1 vote
2 answers
508 views
Delete directory and create new one with same name and permissions [closed]
I want to delete a directory with its contents recursively, and then re-create it with the same name and permissions. That directory may or may not be created or owned by me earlier before delete, but ...
-1 votes
1 answer
167 views
How to delete all "stuff" (dir and files) older than x days?
I am aware of find -mtime +x -delete, but how do I use it - or use it in a script - in order to delete all the "old stuff" (including hidden files) ? Eg, if I have a dir target_dir: delete ...