Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [delete]

The tag has no usage guidance.

-1
votes
1answer
23 views

remove multiple files between 2 files in Ubuntu Linux

I have some files as below: SRR797100.sra SRR797101.sra SRR797102.sra SRR797103.sra SRR797104.sra SRR797105.sra ... SRR797189.sra SRR797190.sra Now, I want to remove files between SRR797101.sra and ...
0
votes
0answers
19 views

How can i reduce the size of CentOS OS for it to still work? [duplicate]

So I have a clean installation of CentOS 7 on a virtual machine. The thing is I need to shrink the size of the thing to the lowest and still be able to have javascript supporting browser and a PDF ...
0
votes
1answer
20 views

CUPS printer is getting deleted spontaneously

I have a Brother HL2240 printer attached to a Linux Mint machine, using KDE, and shared to my other home's computers. However, it gets removed from CUPS spontaneously. Despite that everytime I add the ...
0
votes
1answer
13 views

Can't remove files in the printer spool

I can't remove files in the printer spool for some reason: $ sudo ls /var/spool/cups lists a bunch of files like 'c00083' etc. $ sudo rm /var/spool/cups/* rm: cannot remove '/var/spool/cups/*': No ...
0
votes
0answers
66 views

cannot find Trash folder! Ubuntu 18.04

I am running a preinstalled version of ubuntu 18.04 but cannot find Trash folder. The typical places don't have the folder. ~/.local/share/Trash <-- does not exist /root/..../Trash <-- does ...
0
votes
0answers
29 views

cannot permanently delete Xcode.app in trash, not even if with “sudo rm -rf” because directory is not empty?

I run on osx 10.14, and I was trying to delete and reinstall xcode. I have also tried the following in safe mode but have the exact same problems. I moved xcode.app to trash, right clicked and chose ...
0
votes
0answers
69 views

“Permission denied” error when deleting files although owner of file

-rw------- 1 sato_y sato_y 19 Aug 15 2018 _complete drwx------ 2 sato_y sato_y 68 Aug 15 2018 files -rw------- 1 sato_y sato_y 673 Aug 15 2018 _invocation [sato_y@ircms-icals fork0]$ rm ...
0
votes
1answer
47 views

apt remove glob installing extra packages

when i just tried to uninstall all things poppler with apt remove *poppler* --autoremove apt tried to install 34 new packages. Why would this happen? apt output: # apt remove *poppler* Reading ...
2
votes
1answer
49 views

Get list of files deleted by `find -delete` [duplicate]

This command lists all the files match the provided name: find . -iname .DS_Store But when I use -delete parameter with it, I can't see the list of deleted files. They just get deleted. Preferably ...
0
votes
1answer
62 views

How to remove Linux from a dual-boot system while keeping FreeDOS bootable?

I installed Linux Mint next to FreeDOS (not Windows) from a LiveCD and now I have a dual-boot system. I want to remove Linux and return to the previous situation with FreeDOS as sole OS. But if I ...
1
vote
1answer
63 views

Allow user to remove file owned by root

I have a limited user and access to root. How can I give that user the possibility to remove files owned by root? I have the following line added in /etc/sudoers.d/john : john ALL=(ALL) NOPASSWD:/...
0
votes
2answers
38 views

How to delete directories based on `find` output: ONLY the first result

Based on this question, How to delete directories based on `find` output? I tried to remove only the first folder of result doing: find * -type d | head -n1 | -exec rm -rf {} \; But I receive ...
1
vote
2answers
55 views

Delete non empty directory using find

I'm trying sudo find . -type d -name '__pycache__' -delete as found here https://github.com/python-mode/python-mode#how-to-install on the trouble shooting page of python-mode. The terminal returns: ...
2
votes
4answers
75 views

SED delete csv column if exists

I need to remove a column from my tabulated CSV file if this column exists. My CSV file: GENE REF ALT AKT A G AKT G G Desired output: if column REF exists delete this column GENE ALT AKT ...
0
votes
1answer
221 views

What are the differences between rm and '-delete' in find? [duplicate]

We want to delete the files under /tmp that are older than 100 minutes. What is the difference between: find /tmp -type f -mmin +100 -exec rm {} \; and: find /tmp -type f -mmin +100 -exec -delete ...
4
votes
3answers
235 views

sed or awk: remove numbers after a symbol

I would like to remove just the numbers and "_" after ">" symbol, for example: >1_CR-B_CR56_t MTKIIKFVYFMTIFISPNHHCPVYNCTHPKQPWCKLVRLQLLFHGSLIGLCDCI >2_R-B_R46_t ...
0
votes
0answers
111 views

How do I delete a single one-off file without disturbing the batch-job I'm making?

As a follow up to this question, how do I delete a single file without losing the selection that I've already got? for i in $(seq 1 5); do touch "$i.jpg"; done; mkdir subdir Let's say you marked 1....
0
votes
2answers
43 views

delete then rename: same filenames different extensions

I have a directory containing thousands of files, each file has a duplicate. An example: file1.txt file1.jpg.txt file2.txt file2.jpg.txt I want to delete all *.txt files, and leave the *.jpg.txt ...
0
votes
1answer
126 views

Empty trash in ubuntu

I'm trying to empty my trash using the UI but it doesn't work. i tried to use this command rm -rf ~/.local/share/Trash/* but it does not success with messages like rm: cannot remove 'file.txt': Read-...
0
votes
0answers
53 views

midnight commander mcedit delete selection on backspace

I have pretty ingrained in my brain to select text and then press backspace to delete that text from Is there any way to get this to work in mcedit on mac/linux?
0
votes
1answer
136 views

How to delete all directories inside a directory except for files, (safely)?

Environment System: Linux Mint 19 Cinnamon. Shell: Bash version 4.4.19(1). Problem Along with hundreds of testing scenarios, I must have created countless of temporary installation directories ...
0
votes
1answer
38 views

Tab auto-deletion at command line

Running Ubuntu 18.04 and using bash. So I am aware of how to use tabs at the command line to auto-complete the next token with file paths and what have you. Question: is there an easy shortcut for ...
1
vote
1answer
82 views

btrfs subvolume delete /old/opt taking a lot of time and CPU resources, why? what do it about it?

The command: btrfs subvolume delete /old/opt Has been running over night. Currently 980 minutes and counting, and it is pegging 1 CPU core at 100%. I also initiated a second delete, and it too is ...
0
votes
1answer
145 views

is it safe to delete ~/home/{User}/.cache/ [duplicate]

IF it's cache it is probably meant to be cleared eventually, but can I just manually delete the whole .cache folder? It's eating over 10 gigabytes on a 64 GB partition. I think it is mostly unity ...
-1
votes
1answer
50 views

Removing files containing, only, one row? [duplicate]

I have large number of csv files saved within a folder. I would like to, only, delete the csv files that contains one row, how can I do that?
0
votes
1answer
48 views

Incompatibility between -prune and -delete in find command?

The manpage for find says: -prune True; if the file is a directory, do not descend into it. If -depth is given, false; no effect. Because -delete implies -depth, you cannot ...
1
vote
1answer
197 views

How to delete a corrupted file on an NTFS partition?

I have an NTFS partition(/dev/sda3) mounted via ntfs-3g on arch linux. This partition contains a file called cee431d2730eb5e1697bd57b3bb529 which I want to delete. ls -la returns the following output ...
2
votes
2answers
303 views

How to remove every file and folder recursively except for a few specific folders?

Having the Busybox ash shell at hand, I wish to cleanup the /opt folder. Cleanup means to remove every file and folder recursively except for a few exclusion paths that need to be left untouched. ...
7
votes
3answers
2k views

Delete files with names that appear to begin with '?' in command line

I am running under Debian stable, Cinnamon DE and I have some files that I would like to delete with a command line (for now I delete these files with Nemo). For example, these .txt files begin with '...
0
votes
1answer
21 views

Remove files with names matching a pattern in a directory and preserve the rest

I have a folder with files named MA1, MA2, .... MA-i (without extension and in total more than 110000) with other file and other subdirectory. I wish to delete all MA-i file and preserve the other ...
5
votes
3answers
512 views

sed/awk to remove double quotes " that are inside of curly braces {}

I have a csv file with data similar to this: "1b579a5e-9701-40eb-bd36-2bc65169da99","week14_Friday-019","6907eaad-1aff-4d26-9088-ba20374b67c0","2181-019","f20af5bb-c716-42e0-9b9d-cbolf5bfecea","15-...
2
votes
2answers
171 views

Removing a directory with colon from CIFS

I cannot delete a directory containing a colon (using Ubuntu) on a network drive (filesystem: CIFS). How can I delete this directory? (no root privileges, but do have read/write permission) Output of ...
0
votes
0answers
29 views

Samba share: Create a desktop.ini file in the Trash folder automatically (vfs_recycle). Execute script when file deleted?

I have a Samba share with vfs_recycle enabled. I have several users in the system and each of them have access to their own "Personal" share based on their username. Each of them have their own Trash ...
0
votes
2answers
49 views

What does it mean to overwrite a file but keep it?

The wipe tool has the option -k Keep files, i.e. do not remove() them after overwriting. What does that mean not to remove a file that was ... well... wiped?
0
votes
5answers
63 views

Deleting files using pattern matching for files containing spaces and asterisks

Due to a program that wasn't functioning well, I have many files in my home directory starting with a dot and containing strange symbols among which are spaces and asterisks. I want to delete these ...
1
vote
2answers
88 views

Unix: it there a way to make a file writable, but not deletable nor movable nor copyable?

We have some "living documents", which are accessed by multiple peaple. Is there a way in unix to make a file only readable and writeable, but not moveable nor copyable nor deleteable? The purpose of ...
0
votes
1answer
30 views

Modify a string to remove characters

I have a text file where the barcode is in column 18. I'm interested in removing the last 16 characters from a TCGA barcode for a long list of samples or alternatively I want to print only the first ...
1
vote
2answers
41 views

Can someone delete my non-empty directory from a write-all directory without having write permissions on it?

I know that deleting a file depends on the permissions I have on the enclosing directory, and not on the file itself, see e.g. here But what about a non-empty directory? Using rm -rf NON_EMPTY_DIR ...
0
votes
1answer
70 views

How can I manage a trash created under `/`?

Last time I trashed a file $ pwd /tmp/test $ trash mfile trash: cannot trash regular file `mfile' $ sudo trash mfile $ and the file went into $ sudo ls /.Trash/0/files -la total 12 drwx------ 2 ...
0
votes
0answers
214 views

Linux Mint: removing files via UI does not always delete the file icon from directory

I'm using Linux Mint 18.3 (Cinnamon 3.6.7) and I've noticed that when I delete files using the 'Del' key, sometimes they do not disappear from the directory. If I try to delete them again, I get an ...
2
votes
2answers
213 views

Remove a combination of numbers and symbols from a string using the ${VARNAME//pattern/} way

I am trying to write a script that performs diff on the output of valgrind using two different executables, but the process ID at the start of each line is littering my diff output. I am trying to ...
4
votes
1answer
2k views

Can I Delete 70-persistent-net.rules?

Our program runs on a linux server (NAS) with 2 drives. In theory we can remove the drives from one of our clients servers and put it in another server and go. But every time I need to FIRST delete ...
1
vote
2answers
837 views

What would happen if I did `rm -rf *` in the root directory?

I was just thinking about the rm -rf * command. The rm command removes any files following it, the -rf bit indicates to extend the rm command to include directories, and * means everything. So, I ...
1
vote
1answer
205 views

How does the purge command know where to look to delete package config files?

I am just starting to get how purge and remove are different from each other, but one thing I don't get is: How does purge know where to look for user config files, and how much does it actually ...
0
votes
1answer
429 views

I can't delete file with rm command as root [closed]

I am short on storage, so I tried to delete files, but I couldn't. It just gave me the following message: rm: cannot remove . ~ : Permission denied In my case, I've accessed as root, and every file ...
0
votes
2answers
29 views

What's a convenient way to move files and subdirs “up a subdir” with possible name clash?

I've some files and directories within the directory /var/foo/bar/baz. Now, I want to move all of them up into /var/foo/bar, and get rid of baz. Easy, right? cd /var/foo/bar mv baz/* . rmdir baz (I'...
1
vote
1answer
31 views

Problem in removing songs only from playlist, not delete the song file!

I am using Audacious 3.9 as my default music player on my Fedora Gnome 27 and I'd like to remove a song of my current playlist, but the matter is: there is no choice for that neither in right-click ...
0
votes
1answer
4k views

“Device or Resource Busy”

I am trying to delete a directory using rm -rf dirName But I receive a bunch of errors like: rm: cannot remove 'deleteMe/icarus/.nfs0000001bcf11514a0000cd45': Device or resource busy When I try ...
1
vote
1answer
422 views

How to remove the trailing slash from a variable which defines a directory from a time test output

Ubuntu 16.04 Even thou the output of for client in */; do doesn't produce a trailing slash, the trailing slash appears if I echo the variable $client while performing a time test on the file, within ...
0
votes
1answer
72 views

Ubuntu: Issue in removing package ultimate-download-manager2

I installed program from ubuntu software center, the program is called ultimated media downloader 2. However, after that I tried to remove it but I could not find it using dpkg -l, or apt-get remove/...