Questions tagged [delete]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
14 views

Cannot delete files from within meld (despite being root)

I am a regularly using meld to compare files and folders on my Linux boxes / VMs. I really like it, and it works reliably and even treats symbolic links reasonably, but I have a problem: The Delete ...
0
votes
1answer
32 views

Delete all zip files from a folder recursivley

I am trying to delete all zip files from a folder /mnt/drive1/temp and its subfolders recursivley. I am aware that an incorrect command here could have disastrous consequences so wanted to check I had ...
0
votes
1answer
19 views

Recoll: Removing directories from Xapian db after indexing

Directories can be excluded from Recoll indexing with the parameter skippedPaths in recoll.conf. Does this remove the skipped directory data from Xapian db if the directory was indexed earlier? If it ...
0
votes
1answer
23 views

Prevent “yum remove package” from deleting/renaming config files

I have created a RPM package and it is uploaded to my local yum repository. When I (or future user) install + edit config files of the package and then remove the package (yum remove <package>) ...
1
vote
1answer
45 views

Uninstall Packet Tracer which is installed using wine

I have installed Packet Tracer 7.2.2(.exe file) using wine and have uninstalled it using the same uninstall.exe file provided. When uninstalled all the files of packet tracer are removed except the ...
-1
votes
1answer
36 views

Delete files with specific content

Having a thousand of data files (same extension) in a directory, how to delete those which contain a specific parameter statement? For example, if I wented to delete all files containing the line Key =...
0
votes
1answer
73 views

Completely securely deleting a single file [duplicate]

My impression is that, if one wishes to be able to delete a certain file completely, without wiping an entire drive, one should never store it on an SSD. Is that right? Even with whole-disk-...
-2
votes
1answer
46 views

delete specific rows from a tab separted file [closed]

I have a tab separated file, which has 6 columns, but some rows are not so: There are many such lines in my file like the 7th. When I write awk '{print $1"\t"$2"\t"$3"\t"...
0
votes
1answer
53 views

How to delete files using grep?

Here the result of this command : sudo dpkg -l | grep mariadb It returns me this : ic mariadb-server-10.3 1:10.3.23+maria~bionic amd64 MariaDB ...
1
vote
1answer
26 views

delete wildcard throughout subdirectories, Mac OS

I would like to delete wildcard throughout all subdirectories under the directory where I run the command.
0
votes
1answer
89 views

“Invalid argument While reading flags on” problem on deleting files in linux system

"Invalid argument While reading flags on" problem on deleting files in linux system I cannot delete some (very big files) on linux filesystem. I dont know what to do! id uid=1000(elias) gid=...
0
votes
1answer
45 views

Script for file deletion based on extension

How can I delete with a script each file with an extension that is present in a list of file extensions? The list must be included in the script itself as I need to remove easily a bunch of files that ...
0
votes
0answers
54 views

how to delete a file physically from disk in linux so that there is no way it can be recovered?

I am trying to delete a file in linux, (Ubuntu 20.04). As per my understanding, when we delete a file, the inode and directory entry structures are modified first and the file is actually deleted at a ...
0
votes
1answer
27 views

Error: find argument list too long and -maxdepth 0 is not helping, directory contains many files

I'm trying to delete image cache files older then 100 days via command find /mnt/data/cache/*.jpg -maxdepth 0 -mtime +100 -type f -ls -delete but the thing is /mnt/data/cache/ contain large amount ...
1
vote
2answers
35 views

Help uninstalling virtualbox

I am running Debian 10 and I installed VirtualBox, but now it won't go away. When trying to run sudo apt purge virtualbox I am met with the following output: Virtual packages like 'virtualbox' can't ...
0
votes
0answers
16 views

restoring a deleted file, returning an error

I've had the bad luck of removing a file that was not yet added to a git repository. I'm trying to recover it with this code: mount -o remount, ro /dev/sda1 # to remount in read only mode. extundelete ...
1
vote
0answers
17 views

Prevent deletion of folder by accidentally moving or deleting parent folder that has no immutable attribute [duplicate]

In the PARENT_FOLDER I store subfolders with some works I am producing each week, e.g. right now I have these contents: ~/PARENT_FOLDER/StuffProducedTwoWeeksAgo/... ~/PARENT_FOLDER/...
0
votes
2answers
30 views

How would you delete files with a certain string at the end of their names?

I have some photos named like this: photo_1@15-05-2018_18-49-14.png But I only want to delete files with ending with _thumb.png, like photo_1@15-05-2018_18-49-14_thumb.png All of them are in different ...
-3
votes
2answers
151 views

How to totally remove Ubuntu?

I've got Ubuntu on my laptop and I want to completely remove it so I have no OS on it. Google provides no answers which would be relative, they are only like "How to delete Ubuntu if you have Windows/...
3
votes
3answers
960 views

How to make a symlink read only (`chattr +i /location/symlink`)?

How can we lock a symlink so it cannot be deleted? With a normal file/directory chattr +i /file/location can achieve this but doing so with a symlink we get chattr: Operation not supported while ...
1
vote
3answers
55 views

Delete all files within a directory, without deleting the directory

I have a directory called outer. outer contains a directory named inner (which contains lots of files of same extension) I cd to outer. How can I delete all the files within inner but leave the ...
0
votes
1answer
42 views

Why am I still seeing old log files and not having new ones?

This is my setting logrotate /home/sy/logs/kitxit*/*/tend.log { daily rotate 10 dateext compress delaycompress copytruncate missingok ...
-1
votes
1answer
28 views

Is it safe to delete an accidental copy of root folder?

I accidentally copied my root folder to my local folder using the command cp -r /. Several folders like /boot and /opt were copied. Is it safe to delete these folders from my local directory using ...
2
votes
2answers
80 views

Remove files with no data and only header

I want to remove the files which have only header and no data. I tried the below command and it is working fine, Only issue is it is giving exit status as 1 which should be zero. wc -l /Path/File_* |...
0
votes
2answers
35 views

Delete directories using find command or anything else

I am trying to write a command that will keep only the last 2 backups and delete the remaining directories. directory path = /apps/ Below are the directories and here I would like to keep only ...
0
votes
1answer
97 views

What is the impact of deleting /etc/rc.d and /etc/rc0.d?

I am relatively new to black-screen Os-es (*nix) I was given few commands to run on Linux: remove etc/rc.d/rc0.d remove only logscan, procscan and gpp I got confused and did: rm -rf rc.d rm -rf rc0....
1
vote
3answers
211 views

Delete set of folders contain more than one '-' in different places as a part of their name

How can I delete many folders that have more than one - in their names? For example: e97bf913-5759-4fff-bdaf-2f931b53a432/ 39f953c5-dab0-420e-a650-a50a30f48097/
0
votes
1answer
201 views

rm -rf not working

I'm trying to remove Anaconda with rm -rf miniconda3 on Linux. However, when it runs I get as output that it cannot remove things because the directory is not empty ( for example rm: cannot remove ‘...
0
votes
2answers
64 views

How to keep only one largest size file and delete all other files

There are 3 or 4 files in same directory as below; AAA.360p.mp4 AAA.450p.mp4 AAA.720p.mp4 AAA.1080p.mp4 Filenames of those files are almost the same except expression of frame resolution. (AAA is ...
0
votes
2answers
73 views

using sed in a for in loop to remove words from file

I have a file 'book'(not txt) which contains text. I also have a list of words which I need to delete from said file. I have written this script but for some reason when I try to check and see if the ...
0
votes
0answers
76 views

get “Directory not empty” when I try to remove directory on external Tuxera NTFS drive?

try to delete some old folder (on NTFS driv - Tuxera) when use delete immediately: "is in use" i try restart but nothing changed & can't try in safe mode because of Tuxera needed try with rm -...
0
votes
1answer
21 views

Can't delete file - only permissions change - why?

I am trying to delete a file and while it works fine through the shell, when I call my script from another program, instead of deleting the file, it merely changes the permissions to something odd: $ ...
1
vote
0answers
29 views

Directory with thousands of files can't be deleted on MacOS Mojave

I am running on macOS Mojave version 10.14.6. I wrote a program that creates files. It had a run away accident and created a huge number files in a directory. I don't know how many files it created ...
0
votes
2answers
55 views

How to delete particular lines in vim editor

Suppose I have 50 lines in my vim editor and I have to delete particular lines (5,9,16,28) in a single command.
0
votes
1answer
159 views

How to remove/uninstall Apache Netbeans if there is no uninstall.sh?

Some time ago I installed Apache Netbeans on my Linux Mint laptop, but since there are no official installers for the LTS version, I downloaded the binaries and unzipped the archive they were in. ...
2
votes
1answer
114 views

Delete millions of files efficiently, without first generating a list of all files to be deleted [duplicate]

I've been trying to figure out how to delete millions of files from a mounted NAS drive. The OS I'm accessing it from is RHEL 7.6. The directory is actively being written to, with tens or hundreds ...
5
votes
3answers
1k views

Remove all files with particular name but different extensions at once

I have a directory where I have the following set of files: cheatsheetold.aux cheatsheetold.log cheatsheetold.out cheatsheetold.pdf cheatsheetold.synctex.gz cheatsheetold.tex cheatsheetnew.aux ...
-1
votes
1answer
31 views

Removing files and directories inside an directory

In Unix,How to remove files and directories from the directory named as parent. The parent directory is placed inside grandparent directory.i need to remove only the files and directories inside ...
0
votes
1answer
50 views

Remove all hidden files

Is there a command that will remove all the hidden files in a directory, including its subdirectories? I need it to only remove the hidden files, not regular ones.
1
vote
1answer
43 views

How to remove permanent/pre-installed Chromium extensions in Linux?

I am using Chromium (not Chrome) under Debian 9. How can I remove this extension: Obviously, it cannot be removed by clicking "remove" and it cannot be found under its ID in /home/.config/chromium/...
0
votes
3answers
63 views

Delete last x-number of lines in txt file if it contains characters, in bash

I have a list of .txt files in a folder and I would like to delete the last 50 lines (whole lines) IF they contain letter characters. So far I have the following: for i in *.txt do max_line=$(cat ${i%...
10
votes
4answers
5k views

How do I delete a directory that contains only '.' and '..', but rm says is not empty?

These two files are artefacts of Office 2011 that are preventing removal the 'Contents' directory. How do I delete these? sh-3.2# ls -l -a total 21496 drwx------+ 15 Beef staff 480 Jan 14 23:...
0
votes
2answers
47 views

Remove '?' character from many filenames in a single directory

I have many files in a directory that have names containing ?, and I want to remove these ? characters. Could you please help me with that?
1
vote
1answer
60 views

Traverse directories, compare the tree, delete files missing on one side only

Trying to figure out how to remove any .mp3's in the /out/ directory hierarchy that do not have matching .flac's in the corresponding /in/ folder... and also any other files in the /out hierarchy that ...
0
votes
3answers
223 views

Quicker alternative to Linux Wipe Command for secure deletion

I am fairly new to Linux but all I can say is I love it!!! :D Anyways, I am trying to securely erase 1000s of files from my harddrive because new year is approaching and I want a fresh start to life. ...
0
votes
2answers
152 views

Remove all duplicate files in subdirectories in main directory

I am new to Linux and was wondering how I would go about deleting all duplicates with same file name but only keep one original? For example I have the following: dir_new_001 = rdt.txt dir_new_002 = ...
0
votes
0answers
55 views

rm command crashed my server

I ran the following command find /tmp/ -type f -mtime +2 -exec rm -f {} \; on my centos server in the attempt to free some space. After running this command my server crashed. I had to restore from a ...
0
votes
2answers
31 views

Command to recursively delete all files with changing extension number

I know how to delete recursively all files with a specific extension, but how about if that extension has a number appended to it? For example, how can I delete files named .d3plot1, .d3plot2, ....
0
votes
1answer
77 views

How to remove google drive folder from Computer

Is there a way to definitely delete the google drive folder appeared in the Computer desktop folder in Linux Mint 19.2? It seems it is treated from the os like a mounted partition, but unmounting it ...
2
votes
0answers
39 views

Delete all folders except which are mapped in symlinks

I need to delete folders that are not in use. There are a few symlinks which points to this folder. My requirement here is in 3 step. 1) Get all the available folders at top level which are not ...