I’m having an unusual issue - some files and directories that definitely exist, and are not .dot files, don’t show up in directory listings. This happens in the file mananger (Dolphin), on the command line (bash and zsh) and in file dialogues, even when hidden items are shown (e.g. ls -A). And in bash, they don’t show up in filename completion either. As far as I can tell there are no permissions issues (owned by me, owner has rw and x for directories), and no ACLs.
You can see in this first screenshot that the Downloads directory is not listed either in dolphin or by ls -A:
It’s been happening for ages and I’ve just lived with it - and I can continue to do so - but I reckon I’ve probably just activated some weird configuration somewhere that I’ve forgotten about and someone might know something.
You probably have borked your Dolphin settings. Just verify the options you have to show content. There are many options, hard to say which one needs to be adjusted.
ls -A doesn’t list the files (see first screenshot) - the only difference between ls -a and ls -A is that they include/exclude the . and .. entries.
ls will show the files in Downloads regardless of whether I run ls -al Downloads from outside the Downloads directory, or just ls -al inside it. But however I run ls in my home directory, it never shows Downloads as an entry.
Why do you provide only the graphical output of Dolphin Places (these are not reflecting folder structure) instead of the full output of ls -la including info in which folder you are? This would be much more helpful…
I provided a screenshot to demonstrate that the issue is the same in Dolphin, bash, etc… Seemed like the most useful way to demonstrate that the issue isn’t just in bash and isn’t just in Dolphin
Here’s the output:
darren@Yaddle:~ :) $ pwd
/home/darren
darren@Yaddle:~ :) $ ls -al
total 544
drwx------ 108 darren darren 36864 Sep 28 18:32 .
drwxr-xr-x 5 root root 4096 Sep 30 2022 ..
-rw-r--r-- 1 darren darren 164 May 10 2022 .actrc
drwxrwxr-x 7 darren darren 4096 Nov 19 2022 .android
-rw-rw-r-- 1 darren darren 265 Oct 19 2017 .apport-ignore.xml
-rw-r--r-- 1 darren darren 220 Feb 27 2017 .bash_logout
-rw-r--r-- 1 darren darren 5642 Dec 27 2023 .bashrc
drwxr-xr-x 5 darren darren 4096 Dec 27 2023 .cargo
drwxrwxr-x 12 darren darren 4096 Feb 27 2017 .cddb
drwxr-xr-x 2 darren darren 4096 Aug 7 2022 Cloud
drwxr-xr-x 111 darren darren 61440 Sep 28 18:31 .config
drwxr-xr-x 27 darren darren 12288 Sep 27 21:52 Documents
drwxrwxr-x 3 darren darren 4096 Feb 27 2017 .dosbox
drwxr-xr-x 3 darren darren 4096 Jun 12 2018 .emscripten_cache
drwxr-xr-x 3 darren darren 4096 Jun 12 2018 .emscripten_ports
lrwxrwxrwx 1 darren darren 18 Mar 10 2017 .face.icon -> /home/darren/.face
drwxr-xr-x 4 darren darren 4096 Feb 19 2021 Games
-rw-rw-r-- 1 darren darren 173 Aug 25 2021 .gitconfig
drwx------ 5 darren darren 4096 Aug 4 16:20 .gnupg
drwxrwxr-x 10 darren darren 4096 Mar 21 2022 .gradle
-rw-r--r-- 1 darren darren 437 Sep 27 17:33 .gtkrc-2.0
lrwxrwxrwx 1 darren darren 23 Sep 1 2019 .gtkrc-2.0-kde4 -> /home/darren/.gtkrc-2.0
-rw------- 1 darren darren 14 Sep 28 13:51 .histfile
drwxr-xr-x 3 darren darren 4096 Mar 2 2024 .hplip
drwxr-xr-x 3 darren darren 4096 Sep 15 2019 'Kalypso Media'
drwx------ 2 darren darren 4096 Jun 11 2017 .lldb
drwxrwxr-x 21 darren darren 12288 Feb 20 2024 .minecraft
-rw-r--r-- 1 darren darren 454 Jan 8 2019 .mingw-64-bshrc
drwxr-xr-x 3 darren darren 4096 Jun 20 2019 .mono
drwx------ 6 darren darren 4096 Aug 1 2020 .mozilla
drwxrwxr-x 2 darren darren 4096 Feb 27 2017 .nano
drwxr-xr-x 3 darren darren 4096 Sep 7 2020 .nodejs
drwxr-xr-x 6 darren darren 4096 Apr 16 23:04 .paradoxlauncher
drwxrwxr-x 4 darren darren 4096 Sep 5 2018 Podcasts
-rw-r--r-- 1 darren darren 840 Dec 27 2023 .profile
drwxr-xr-x 4 darren darren 4096 Apr 29 2018 Public
lrwxrwxrwx 1 darren darren 11 Feb 27 2017 Shared -> /mnt/shared
drwx------ 3 darren darren 4096 Sep 20 17:05 snap
drwxr-xr-x 11 darren darren 4096 Feb 7 2018 .snes9x
drwxr-xr-x 5 darren darren 4096 Mar 18 2024 .ssr
drwxr-xr-x 2 darren darren 4096 Sep 28 13:38 .steam
lrwxrwxrwx 1 darren darren 29 Sep 28 11:00 .steampid -> /home/darren/.steam/steam.pid
drwxr-xr-x 2 darren darren 4096 Sep 12 2021 .swiftpm
drwxrwxr-x 3 darren darren 4096 Jan 16 2018 .swt
drwxr-xr-x 7 darren darren 4096 Sep 9 20:01 Sync
drwxr-xr-x 4 darren darren 4096 Mar 28 2018 Templates
drwxrwxr-x 13 darren darren 4096 Sep 28 11:44 'VirtualBox VMs'
-rw------- 1 darren darren 51 Jul 13 2023 .Xauthority
-rw-r--r-- 1 darren darren 19 Aug 31 2020 .xinitrc
-rw-r--r-- 1 darren darren 45652 Sep 28 13:46 .zcompdump
-rw-r--r-- 1 darren darren 21 Dec 27 2023 .zshenv
-rw-r--r-- 1 darren darren 662 Sep 29 2022 .zshrc
darren@Yaddle:~ :) $ stat Documents
File: Documents
Size: 12288 Blocks: 24 IO Block: 4096 directory
Device: 0,50 Inode: 58594048 Links: 27
Access: (0755/drwxr-xr-x) Uid: ( 1000/ darren) Gid: ( 1000/ darren)
Access: 2024-09-28 10:59:14.320807222 +0100
Modify: 2024-09-27 21:52:29.201710012 +0100
Change: 2024-09-27 21:52:29.201710012 +0100
Birth: -
darren@Yaddle:~ :) $ stat Downloads
File: Downloads
Size: 32768 Blocks: 72 IO Block: 4096 directory
Device: 0,50 Inode: 46157100 Links: 15
Access: (0755/drwxr-xr-x) Uid: ( 1000/ darren) Gid: ( 1000/ darren)
Access: 2024-09-28 13:54:27.224115989 +0100
Modify: 2024-09-28 12:40:56.979524066 +0100
Change: 2024-09-28 12:40:56.979524066 +0100
Birth: -
darren@Yaddle:~ :) $
As you can see, no difference in perms or ownership between Documents (which is listed by ls) and Downloads (which isn’t).
I’m not expecting anyone to go diving into this, just wondered if anyone had seen anything similar and might be able to point me in the right direction.
That is truly puzzling.
If I was you, I’d move the content of that directory elsewhere (or copy it, if space is not too tight)
and then would rename it and create a new directory of the same name and move the stuff back.
Just to be safe - who knows what other mysteries will happen and then the files are gone …
I can’t think of any simple explanation for this, so for now I guess you can try to rule out things which could interfere with what you see compared to what we would expect to see.
Have ls or cd been aliased in any way? (Can check with alias ls and then alias cd)
Is the CDPATH environment variable set? (Can check with echo $CDPATH)?
IMHO this still does not disclose the location of Downloads in the hirarchical file system tree… Have your searched for “Downloads” with baloo, already?
I think you’re onto something there. The Downloads directory may have inadvertently been moved elsewhere, while the Places section in dolphin still shows it in the same place because that is an XDG built-in thing, not a filesystem hierarchy listing.
In future, if you don’t actually require support, please post in a more relevant category; Feedback, for example; otherwise it wastes the time of those genuinely wishing to help. A comment like this (14 posts into a support thread) designed to minimise the intention, isn’t useful.
If ls does not discover your Downloads directory, then the directory may be damaged in a way that causes it not to be detected (unlikely on a native Linux file system), or the directory does not exist at that location.
Assuming the above hints reflect your situation, here’s how to remedy it:
Install xdg-user-dirs (if it isn’t already):
sudo pacman -S xdg-user-dirs
This will create a local ~/.config/user-dirs.dirs configuration:
xdg-user-dirs-update
The xdg-user-dirs-update.service is also enabled, which runs at login to keep directory locations up to date.
Check the content of the local configuration file:
cat ~/.config/user-dirs.dirs
Look for XDG_DOWNLOAD_DIR in the command output. The path next to it shows where your current Downloads directory resides:
If the output reveals anything different from "$HOME/Downloads" then the directory has been relocated at some point (by you). In this case, ls will not find Downloads within your user directory, because it’s not there.
To change the directory that “Downloads” (in Dolphin) points to, the file can be edited manually, or the OP can use: