Questions tagged [delete]

Deleting usually means the act of removing files from their former locations on the system.

In Ubuntu a file (directories are files too) may be deleted:

  • through the GUI, for example by pressing the delete key when the icon is selected or by clicking a button in a context menu. This causes the file to be sent to a location called Trash, where it will remain until Trash is "emptied"
  • by a CLI method, such as using the rm (remove) command, using the -delete option to find, overwriting a file with mv (move) and so on. There is no Trash or undelete for these methods, which clear the associated with the file. Although the file is still present on the disk, the operation cannot be reversed and the data may not be fully recoverable.
713 questions
40
votes
4 answers

How do I delete a hard link?

Recently I created a link with the following: sudo ln -n originalFileLocation How do I delete a hard link?
hawkeye
  • 3,877
8
votes
3 answers

How do I force delete a file?

I have a random file placed in my desktop named "Unconfirmed 371801.crdownload" and I am extremely worried it is a virus and I want to remove it immediately but whenever I try to remove it, it throws a report " “Unconfirmed 371801.crdownload” can't…
Jonathan
  • 107
8
votes
2 answers

How do I remove the default Music folder

I deleted the music folder in Home, but on the left is still the shortcut. I cannot find a way to delete that shortcut? How do I delete that?
6
votes
1 answer

How do you delete files in the location: /usr/local/src?

I tried to move a file into the rubbish bin (because I followed some instructions about installing sage and it involved moving a file to that directory) and it gave me errors saying that I didn't have permission. Even though I'm signed in as an…
Josh Pinto
  • 7,919
4
votes
1 answer

Accidentally created a file called "--help". How to remove it?

I accidentally redirected the output of a command to --help rather than passing it as a parameter. How do I escape the dashes to I can remove the file? This is on a headless server, so I'll need to do it from the command line.
4
votes
3 answers

Delete multiple files with regex

I have folder with sub-folders with same files, for example: dsc_9660__content_w.jpg dsc_9660__content.jpg dsc_9660__h70.jpg dsc_9660__small.jpg dsc_9660.jpg Suffix - is different sizes of images. How to delete all files with suffix like…
4
votes
3 answers

Security Delete files

I am looking for a program that I can use to security delete files/folders. I know you can do it via the terminal, but in previous releases there was a program that you could install that was accessible from the right click menu. Can anyone…
Phil UK
  • 1,397
3
votes
2 answers

How do I make Secure Delete visible in terminal?

my command is srm -r "the title of the directory" it does 38 passes which is insanely too much and recently I noticed I can't see the process of the deletion using ubuntu in the terminal! it is blank now. is this a data concern, because I heard…
2
votes
1 answer

how to delete files downloaded in command terminal?

I downloaded some files like adobe reader,etc by using commands but these files are not compatible to my Ubuntu version.My question is where the downloaded file exists..... please answer this question.
Nd Prasad
  • 21
  • 1
  • 1
  • 3
2
votes
1 answer

How to recursively delete files filled with zeros?

I have many files in a folder tree, of which some are filled with zeros and others are real files. How can I delete files filled with zeros recursively?
user69286
2
votes
1 answer

Using fdupes to auto delete files but keep the second file and not the first

As the subject says I'm looking for a way to delete duplicate files automatically. I know I could run the command fdupes -rdN but that automatically chooses the first file while deleting the second. Asking because my dupes are listed similar to…
NCGT
  • 33
2
votes
2 answers

Removing the Ubuntu 16.04 Operating System

Can the Ubuntu 16.04 Operating System be removed / emptied from my computer? Help me to solve this, I want to restore my computer like a new situation, which is without an operating system.
user888596
1
vote
1 answer

How to find and delete multiple files

I'm wanting to find multiple files as in find /etc/ /usr/ -type f,d -size +1k -exec ls -slah {} /; -exec rm -riv {} + My question to you is how can I delete only the file size 5k and below with the -exec option
user610658
1
vote
1 answer

Delete files older then x days, from the day when they moved into random folder

I run Ubuntu 14.04 as file server for windows clients. Clients have mapped network shared folder to work with. When they delete files from that folder, files goes to ".recycle". I wanted to delete files older then x days. I used autotrash command:…
Milan
  • 13
1
vote
0 answers

Ubuntu 14.04 do not start up (latest kernel deleted)

Today I did install Ubuntu 14.04.3 LTS on a new PC (no dual boot!) After fine tuning the whole day, I did delete per accident the latest sub kernel of 3.19.0-30-gen. Now the pc do not start up at all, only the UBUNTU logo is visible. How can I…
JMS
  • 127
1
2 3