Score:5

Missing Downloads folder

br flag

I'm using Ubuntu 20.04 LTS. Suddenly today, my Downloads folder went missing. After googling the problem, I used mkdir to create a new Downloads folder. It was created successfully, but the files inside it are missing.

When I run:

locate Downloads

in the terminal, all the missing files are listed there, but when I try to open them through the terminal it says:

no such file or directory

I'm attaching some screenshots for more details.

ls -l

locate Downloads

Whois_me avatar
us flag
The locate app works with a database. Therefore it leaps behind the real situation inside you PC until "sudo updatedb" is (auto) executed,
Whois_me avatar
us flag
It sounds your in need for some data recovery. Try the application photorec. Good luck.
PonJar avatar
in flag
The principles in this answer may provide a solution https://askubuntu.com/questions/225814/documents-folder-missing
cn flag
"I used mkdir to create a new Downloads folder. It was created successfully, but the files inside it are missing." That is not possible: mkdir does NOT create a directory if it exists. That would need the "rm -r" command.
Score:8
us flag
  1. There is a difference between find, ls and locate commands.

  2. ls - list directory contents, it will show the specific directory you are "standing" at contents.

  3. locate - locate find files by name, the command will return a quick answer but it uses a snap shot of the DB what can make issues when the snap shot is not up to date, it means you can find files that have been deleted and cannot find some new files that have been created.

  4. find - search for files in a directory hierarchy, the command will take more time to return the answer but it is making a deep scan in your directory hierarchy and will find any file on your file system if you have the permissions to look over all your file system - use sudo for this command.

  5. To read more about the differences between find and locate commands look here.

  6. You can find more details on the commands in their man pages by writing in the terminal window man commandName.

  7. When you are using ls command it is showing the up-to-date file status in your directory, which means it can be different from locate.

  8. To look if your files still exist use find command like here.

    • sudo find / -name filename
    • or specific to your situation sudo find / -name 19999_*
    • specific to your situation sudo find / -name 2999_*
    • and so on.
  9. Here is a picture with example to your specific situation:

    • enter image description here
    • as you can see in the example when the file exists we can find it with ls,locate and find commands.
    • after we deleted the file with rm command, ls and find cannot find the file but locate command still finding the file because locate using a DB screenshot.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.