Questions tagged [delete]
The delete tag has no summary.
279 questions
-5
votes
1
answer
57
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.
...
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
1
answer
127
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 ...
0
votes
1
answer
144
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 -...
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
2
answers
136
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.
1
vote
1
answer
140
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
votes
1
answer
155
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 ...
2
votes
3
answers
3k
views
Disk space is not freed up when deleting files on a hard drive
After deleting files on a veracrypt-encrypted drive with no disk space left, no disk space is freed up.
I'm trying to sync a hard drive to another one as described here.
That target drive is full and ...
0
votes
0
answers
32
views
Linux home dir has a "duplicate" under /home/music but when anything is deleted from one it disappears from both -- how can I delete 2nd home dir?
I don't know where the 2nd "phantom" home dir came from. Properties folder shows it's 4K. The "real" home directory is 128,000+ files and 208GB.
User10489 had the answer: a symlink ...
0
votes
0
answers
221
views
Samba file/folder deletion error after Debian 12 upgrade
I recently installed Debian 12 for Raspberry Pi and configured a Samba server. But now when I delete a file or a folder over the network I get an error, Samba object not found and then the file or ...
0
votes
1
answer
758
views
Delete all the files in a folder and its subfolders without deleting the folder structure
I am replicating a server -> I want to delete all the files inside the folders and the subfolders, without deleting the directories themselves.
Example:
home\apps\Batches\hello.txt
home\...
0
votes
1
answer
60
views
Why doesn't find / -delete hose the entire system
I ran the command
sudo find / -mtime +100 -delete
The damage was such that when I pressed ENTER on the console it no longer presented a login prompt.
Later on examining the wreckage I found that the ...
0
votes
1
answer
617
views
could not delete file in trash
I have a file named "1" maybe it was created by using the wrong command when using redirect.
Such as:
commond 2>&1 1>/dev/null
When I try to empty the trash, the file named "...
0
votes
0
answers
2k
views
Can't delete folder: rm: cannot remove: Directory not empty
I'm trying to delete a folder I once created and nothing happens when you try to remove the file in the file explorer.
I tried to remove the file per command line:
rm -rf folder-path/
This is where i ...
0
votes
1
answer
96
views
Linux Trash implementation: Correct place for a Trash Log?
I am working on a Trash implementation and would like to store a log for every deletion. I have reviewed the Freedesktop Trash Specification but couldn't find any information about where to store a ...
0
votes
0
answers
184
views
Fedora 37: cannot remove fwupdate-efi fwupdate-libs
This box was originally Fedora 21 I think, and has been updated a few times like 21 -> 23 -> 25 -> ... -> 25 -> 37 (every odd version), and works fine.
However, I cannot clean these two ...
0
votes
2
answers
158
views
Need help with a command to find all filenames that are too long and delete from a directory
I have been using the following command:
find . | awk 'function base(f){sub(".*/", "", f); return f;} \
{print length(base($0)), $0}'| sort -nr | head -2
It will find some files ...
1
vote
4
answers
238
views
How can I remove files that have an unknown number in them?
I have some code that writes out files with names like this:
body00123.txt
body00124.txt
body00125.txt
body-1-2126.txt
body-1-2127.txt
body-1-2128.txt
body-3-3129.txt
body-3-3130.txt
body-3-3131.txt
...
0
votes
3
answers
624
views
How to remove lines from TSV file where columns are empty or all whitespace?
I've a tab-delimited file, e.g. myfile.tsv:
abc\tfoo
xyz\tbar
but sometimes, it has some blank columns, e.g.
abc\tfoo
xyz\tbar
what\t
\tthe
bleep\tsleep
i.e.
$ printf "abc\tfoo\n" > ...
0
votes
0
answers
236
views
Move or delete file out of folder if detox reports "cannot rename"
I'm backing up recipes in a folder to a backup drive. I use cp -vnpr /folder/* bkdrive/folder so not overwriting or copying same files over and over. Works well. Then I started getting copy problems ...
1
vote
1
answer
1k
views
What is the appropriate way to create a new user, switch to that user, then delete the old user
In a new server, I want to create a user, switch to that user, and then delete the old user completely. I currently do the following:
# create new user
sudo useradd -m -s /bin/bash newuser
sudo passwd ...
1
vote
0
answers
136
views
I removed Bluez, but now cannot get back to GUI
Bluetooth has always been a problem.
In the past, I tinkered with a few things in the command line and got it to work. then it stopped again, so I just left it alone.
Well, it turns out I wanted to ...
3
votes
2
answers
4k
views
How do I delete a specific element in a chain in nftables?
Current system:
Distro: Ubuntu 20.04
kernel: 5.4.0-124-generic
nft: nftables v0.9.3 (Topsy)
I am new and learning nftables, Here is my nft ruleset currently:
$sudo nft list ruleset ...
1
vote
2
answers
63
views
How can I delete everything before and afrer match pattern from pdb file?
I'm beginner in bash scripts, but I try to delete everything in my pdb file (test.pdb) before REMARK time 20.00 and from REMARK time 30.00 to the end of this file. I'm using to this sed command, which ...