Welcome!
Forum users- Please read this before asking for help, and don't forget to add Quick System Info to help requests!
- Please follow the Forum Rules
Current releases
--MX-21 release info here
--Migration information to MX-21 here
--antiX-21 (Grup Yorum) release info here
Important information
-- Spectre and Meltdown vulnerabilities
News
-- MX Linux on social media: here
-- New Forum Features, Marking Solved and Referencing a User: here
Number of a folder's contents in Thunar?
Number of a folder's contents in Thunar?
Other file managers I've used show the number of items inside folders in detailed view but Thunar only shows the folder's size which is always 4.1kb. Can this be changed so it displays the number of items instead?
Please read the Forum Rules, How To Ask For Help, How to Break Your System and Don't Break Debian. Always include your full Quick System Info (QSI) with each and every new help request.
Re: Number of a folder's contents in Thunar?
This is something I've been wondering about. So, I did a bit of searching and found this thread.
Looking at reply #3 (quoted below for easy reference), there might be something there that could work. I'm at work right now and will have to wait until I get home tonight to give this a spin.
Looking at reply #3 (quoted below for easy reference), there might be something there that could work. I'm at work right now and will have to wait until I get home tonight to give this a spin.
And, if this works, I can see it not being too difficult to modify the above to return the number of items (files and sub-folders) in a folder.You can go into Thunar > Edit > Configure cutom actions... and create a new custom action with this commandand name it File count.Code: Select all
output=$(find %N | wc -l) && notify-send "File count" "$output files"
Go into the advanced conditions tab and only check Directories. Close thunar and open it again.
If you now right click on any folder there is a new Item in the menu now named File count. Click on it and a notification should pop up with the number of all the files in that folder including all subfolders. This command only counts the files. not the folders.
If you want the number of folders do it like this:Code: Select all
output=$(ls -1 | wc -l) && notify-send "Folder count" "$output folders"
AsusTek PRIME B450-Plus
AMD Ryzen 7 2700 (8-Core, 16 threads)
GeForce GTS 450/PCIe/SSE2 v: 4.6.0 NVIDIA 390.116
Realtek RTL8111/8168/8411 - driver: r8169
Samsung SSD 860 EVO 500GB
DDR4 3200MHz CL16 2x8GB
AMD Ryzen 7 2700 (8-Core, 16 threads)
GeForce GTS 450/PCIe/SSE2 v: 4.6.0 NVIDIA 390.116
Realtek RTL8111/8168/8411 - driver: r8169
Samsung SSD 860 EVO 500GB
DDR4 3200MHz CL16 2x8GB
Re: Number of a folder's contents in Thunar?
You could right click on "Properties" for the directory to get a file count. I don't think there is an easy way to display it inline.
Re: Number of a folder's contents in Thunar?
That does work! It would be nice to alter that so it shows up in a yad info box as everything else does here.srq2625 wrote: ↑Mon Jan 28, 2019 9:21 am This is something I've been wondering about. So, I did a bit of searching and found this thread.
Looking at reply #3 (quoted below for easy reference), there might be something there that could work. I'm at work right now and will have to wait until I get home tonight to give this a spin.
You can go into Thunar > Edit > Configure cutom actions... and create a new custom action with this command<snip>Code: Select all
output=$(find %N | wc -l) && notify-send "File count" "$output files"
Production: 5.10, MX-21, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: Lenovo X1 Carbon with MX-21 Fluxbox and Windows 10.
Personal: Lenovo X1 Carbon with MX-21 Fluxbox and Windows 10.
- Eadwine Rose
- Administrator
- Posts: 14299
- Joined: Wed Jul 12, 2006 2:10 am
Re: Number of a folder's contents in Thunar?
Indeed.. I right clicked earlier to check between two external drives if the count was the same (one is replacing the other) and it was. Some 25000 odd files.
MX-21.1_x64 Oct 20 2021 * 5.10.0-13-amd64 ext4 Xfce 4.16.0 * 8-core AMD Ryzen 7 2700
Asus TUF B450-Plus Gaming UEFI * Asus GTX 1050 Ti Nvidia 460.91.03 * 2x16Gb DDR4 2666 Kingston HyperX Predator
Samsung 860EVO * Samsung S24D330 & P2250 * HP Envy 5030
Asus TUF B450-Plus Gaming UEFI * Asus GTX 1050 Ti Nvidia 460.91.03 * 2x16Gb DDR4 2666 Kingston HyperX Predator
Samsung 860EVO * Samsung S24D330 & P2250 * HP Envy 5030
Re: Number of a folder's contents in Thunar?
Here's a start for a command using yad, but I will have to look up how to do formatting, alignment etc.
Code: Select all
output=$(find %N | wc -l) && yad --info --title="File count" --text="$output files" --width=50 --height=50Production: 5.10, MX-21, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: Lenovo X1 Carbon with MX-21 Fluxbox and Windows 10.
Personal: Lenovo X1 Carbon with MX-21 Fluxbox and Windows 10.
Re: Number of a folder's contents in Thunar?
Thunar shows the number of files in a directory and the remaining space in all views. What am I doing wrong? :-)
Added: Actually, I think I know what you mean. I just never considered it a deficiency.
Added: Actually, I think I know what you mean. I just never considered it a deficiency.
Re: Number of a folder's contents in Thunar?
I know that, but it would be nice if the directories' file counts were displayed in the main Thunar screen like they are in Dolphin and Nemo, or if there was another column that showed that information.
Please read the Forum Rules, How To Ask For Help, How to Break Your System and Don't Break Debian. Always include your full Quick System Info (QSI) with each and every new help request.
Re: Number of a folder's contents in Thunar?
Mine just has columns for Name, Size, Type and Date Modified with no option to change those. Size for directories is always 4.1kB. I don't see file counts anywhere.
Please read the Forum Rules, How To Ask For Help, How to Break Your System and Don't Break Debian. Always include your full Quick System Info (QSI) with each and every new help request.
Re: Number of a folder's contents in Thunar?
With a folder open click View > Configure Columns, then you can change what columns are displayed.
A file count would be good, what I'd like to see also is the size showing the actual size of the folder's contents, 4.1 kb displayed for most folders is pretty much pointless I think.
A file count would be good, what I'd like to see also is the size showing the actual size of the folder's contents, 4.1 kb displayed for most folders is pretty much pointless I think.