Code Monkey home page Code Monkey logo

qdirstat's Introduction

QDirStat

Qt-based directory statistics: KDirStat without any KDE -- from the author of the original KDirStat.

(c) 2015-2024 Stefan Hundhammer [email protected]

Target Platforms: Linux, BSD, Unix-like systems; macOS

License: GPL V2

Updated: 2024-04-25

Screenshot

Main window screenshot: Tree view (upper half), treemap (below), details panel (right).

Notice the multi-selection in the tree and the treemap.

Overview

QDirStat is a graphical application to show where your disk space has gone and to help you to clean it up.

It shows the total size of directories and of their files both in a traditional tree view and in a colored treemap graphics where a large file is shown as a large rectangle, and small files are shown as small rectangles. Click on it, and you will see where in the tree the file is, and you can instantly move it to the trash if you like. The color corresponds to the file type: Images, videos or whatever.

This is a Qt-only port of the old Qt3/KDE3-based KDirStat, now based on the latest Qt 5. It does not need any KDE libs or infrastructure. It runs on every X11-based desktop on Linux, BSD and other Unix-like systems, and in a Docker container.

QDirStat has a number of new features compared to KDirStat. To name a few:

  • Multi-selection in both the tree and the treemap.

  • Unlimited number of user-defined cleanup actions.

  • Properly show errors of cleanup actions (and their output, if desired).

  • Configurable file categories (MIME types), treemap colors, exclude rules, tree columns.

  • Package manager support:

    • Show what software package a system file belongs to.
    • Packages view showing disk usage of installed software packages and their individual files.
    • Unpackaged files view showing what files in system directories do not belong to any installed software package.
  • New views:

    • Disk usage per file type (by filename extension).
    • File size histogram view.
    • File Age View
    • Free, used and reserved disk size for each mounted filesystem (like df)

See section New Features for more details.

Table of Contents

  1. Screenshot
  2. Latest Stable Release
  3. Latest News
  4. History
  5. Related Software: KDirStat, WinDirStat, K4DirStat and more
  6. Motivation / Rant: Why?
  7. Features
  8. macOS Compatibility
  9. Windows Compatibility
  10. Ready-made Packages
  11. QDirStat Docker Containers
  12. Building
  13. Contributing
  14. Troubleshooting
  15. Further Reading
  16. Packaging Status
  17. Donate

More Screenshots

Full-size images and descriptions on the Screenshots Page


Donate

QDirStat is Free Open Source Software.

If you find it useful, please consider donating. You can donate any amount of your choice via PayPal:

paypal

Latest Stable Release

QDirStat V1.9

See the release announcement.

Download installable binary packages for various Linux distributions here: Ready-made packages

Latest News

  • 2024-04-25

  • 2024-03-01

    • Extended the cache file format to also include UID, GID and permissions, and also improved the formatting to make it better human readable.

      See also GitHub issue #265.

      This new cache file format 2.0 is now the default, but the Perl qdirstat-cache-writer still supports writing the old format without those new fields to make the cache files a bit smaller: Use the -1 command line option.

      Cache files in the old format 1.0 can still be read, of course.

  • 2024-02-13

    • New: macOS binaries for QDirStat

      Jesus Herrera Arroyo [email protected] contacted me to ask for my approval to provide binaries of QDirStat for macOS. I answered:

      Sure, go ahead! But since I have no clue about macOS X, I'll have to redirect any users having macOS-specific problems to your repo's issue tracker.

      So here is his new GitHub repo for those binaries:

      https://github.com/jesusha123/qdirstat-macos

      Go to Releases at the right side panel.

      Also expect them on Homebrew (work in progress).

      I welcome this very much; there have been some tech-savvy users who built their own QDirStat for macOS since the project started in late 2015, but they were always very few, and it's not something for a casual user to do that. The situation should greatly improve with pre-built platform binaries for macOS, making QDirStat much more approachable on that platform.

      As usual with all binary distributions, caveats apply: You need to have trust in the distributor; no matter if it's a Linux distribution like SUSE, Ubuntu, Fedora / Red Hat or all the others out there, or an enthusiastic individual like Jesus Herrera. I am optimistic that he deserves that trust.

      If you don't have that trust, by all means go ahead and build it yourself from the sources, even if that is considerably more work, and it needs some technical expertise about how to build software in general, and about the target platform (macOS in this case) in particular.

  • 2024-01-15

    • Just one day after the stable release, pull requests for missing include files keep trickling in.

      Some time ago, I cleaned up includes, throwing out the ones that I was sure were unneeded; of course recompiling after every step. They were all unneeded on Linux with GCC, but it turns out that at least some of them were indeed needed on other platforms. Probably recursive includes are different on those platforms.

      I am collecting all those pull requests and merging (cherry-picking) them to the stable-1.9 branch. So if V1.9 does not build on your platform with the official release tagged 1.9, please use that stable-1.9 branch. If that still doesn't help - more pull requests are welcome.

      Sorry for the inconvenience.

  • 2024-01-14 New stable release: 1.9

    Summary:

    • Greatly improved the visual appearance of the treemap thanks to @Lithopsian

    • Dominant (very large) items are now highlighted in bold font in the tree view

    • New "Find" function in the scanned directory tree

    • Added support for bookmarks

    • New documentation to explain the treemap

    • Some small improvements

    • Bug fixes

    See also the release announcement.


  • 2021-06-21 QDirStat AppImage and why I don't like it

    TL;DR:

    • It's big and fat (113 MB)
    • It's a very outdated version: QDirStat 1.6.1 from February 2020
    • It doesn't even tell you what version it contains
    • It still needs a fairly recent version of GLibc, so you can't run it on Ubuntu 18.04 LTS
    • It's unclear if at least the libraries inside (e.g. the Qt libs) are up to date

See DevHistory.md for older entries.

History

This is just a rough summary. For more details, see DevHistory.md.

  • 2024-01-14 New stable release: 1.9

    • Greatly improved the visual appearance of the treemap thanks to @Lithopsian

    • Dominant (very large) items are now highlighted in bold font in the tree view

    • New "Find" function in the scanned directory tree

    • Added support for bookmarks

    • New documentation to explain the treemap

    • Some small improvements

    • Bug fixes

  • 2022-06-30 New stable release: 1.8.1

    • New treemap interaction: Middle click in the treemap now highlights the parent directories of the clicked item, and everything outside that branch is dimmed.

    • Some small improvements

    • Bug fixes

  • 2021-08-28 New stable release: 1.8

    • New view: File Age Statistics

    • Navigation history like in a web browser (Back, Forward)

    • Bug fixes

    • Some small improvements

  • 2021-04-05 New stable release: 1.7.1

    • Added a "Discover" toplevel menu with actions to easily find

      • the largest files
      • the newest files
      • the oldest files
      • files with multiple hard links
      • broken symbolic links
      • sparse files
    • Now showing the target of symbolic links in the details panel. If the target does not exist, a Broken Link warning is also shown.

    • Menu reorganization. The new toplevel menus are now:

      File, Edit, View, Go To, Discover, Clean up, Help

  • 2020-07-26 New stable release: 1.7

    • Closing the gap between sizes reported by QDirstat and sizes reported by the du command: Now also taking the allocated size into account.

    • Now also displaying the allocated size where it makes sense.

    • New "Mounted Filesystems" window showing output similar to the df command (but without the cruft).

    • New directory selection dialog showing all (real) filesystems.

  • 2020-02-13 New stable release: 1.6.1

    • Much better handling for "permission denied" errors while reading directories

    • Now showing the exact byte size (134 495 994 Bytes instead of 128.3 MB) upon mouse click

    • New optional tree column "Oldest File" (not enabled by default)

  • 2019-07-22 New stable release: V1.6

    • New packages view

    • New unpackaged files view

    • Performance improvements while reading directories

    • Vast Performance improvement for huge directories (100.000+ entries in a single directory)

  • 2018-11-07 New stable release: V1.5

    • New details panel

    • Package manager support to show what software package a file belongs to

    • New breadcrumbs navigation

    • Switchable tree layouts L1 / L2 / L3

  • 2017-06-04 New stable release: V1.4

    • New file size statistics with histogram

    • Shading for empty space in the treemap for lots of very small files

  • 2017-03-05 New stable release: V1.3

    • New file type view

    • Locate files of a certain type (filename extension) in the tree

  • 2017-01-03 New stable release: V1.2

    • Improved Btrfs subvolumes support
  • 2016-10-31 New stable release: V1.1-Pumpkin

    • Bug fixes

    • Split up the config file into several ones

  • 2016-05-16 First stable release: V1.0

  • 2016-04-08 Beta 3 release

  • 2016-03-20 Beta 2 release

  • 2016-02-06 Beta 1 release

  • 2015-11-28 QDirStat project start: Ported from the old KDE 3 KDirStat

  • Predecessor: KDE 3 KDirStat

    • 2006-06-01 KDirStat 2.5.3: The last KDE3 based version.

    • 2003: Bernhard Seifert wrote WinDirStat based on the KDirStat idea of coupling a tree view and a treemap and providing cleanup actions.

    • 2003-01-05 KDirStat 2.3.3: Treemaps

    • 2002-02-25 KDirStat 2.0.0: Complete rewrite for KDE 2 / Qt 2

    • 2000-01-21 KDirStat 0.86 for KDE 1 announced: First public version.

Related Software

KDirStat and QDirStat

KDirStat was the first program of this kind (combining a traditional tree view with a treemap), also written by the same author as QDirStat. It was made for KDE 1 back in early 2000; later ported to KDE 2, then KDE 3.

QDirStat is based on that code, but made independent of any KDE libraries or infrastructure, so it has much fewer library and package dependencies; basically only the Qt 5 libs and libz, both of which most Linux / BSD machines have installed anyway if there is any graphical desktop installed.

WinDirStat and QDirStat

There are lots of articles and user forum comments about QDirStat being a "nice Linux port of WinDirStat". Well, nothing could be further from the truth: WinDirStat is a Windows port of KDirStat, the predecessor of QDirStat.

So it's the other way round: The Linux version was there first, and somebody liked it so much that he wrote a Windows version based on that idea. That's a rare thing; usually people port Windows originals to Linux.

See also https://windirstat.net/background.html and the WinDirStat "About" dialog.

QDirStat and K4DirStat

K4DirStat is a port to KDE 4 / Qt 4 of the old KDE 3 / Qt 3 KDirStat. QDirStat is independent of that; it is based on the old KDE 3 KDirStat directly.

Other

  • Baobab
  • Filelight
  • ncdu
  • du

See Disk Usage Tools Compared: QDirStat vs. K4DirStat vs. Baobab vs. Filelight vs. ncdu (including benchmarks) in the Wiki.

Motivation / Rant: Why?

After having used KDE since its early days (since about 1998), I didn't like the direction anymore that KDE has been taking. I loved KDE 1, KDE 2, KDE 3. When KDE 4 came along, it took me a long time to try to adopt it, and when I did, I moved back to KDE 3 after a short while, then tried again with the next release, moved back again -- several times.

I really tried to like it, but whenever I thought I tamed it to meet my requirements, a new version came along that introduced yet another annoyance.

To name a few:

  • A lot of things that used to be user configurable in KDE 3 are not configurable anymore, and when you approach the KDE 4/5 developers about that, they will tell you that this is intentional, and they do not intend to bring those config options back. Well, thanks a lot; this is the Apple approach where they think they know what is good for you, and you are just too stupid.

  • Konqueror as the old central tool is as good as dead. It's still there as an alternate file manager (for those who find it), but the primary one is the dumbed-down Dolphin that I consider unusable: It's only useful for complete newbies, not for power users. The web browser part of Konqueror is so outdated that you can't do much with it with most modern web sites, so the great integration of web and local file manager that was the major strong point of Konqueror (and thus KDE) no longer exists.

  • I don't like the fact that I can't simply put icons on my desktop anymore -- no, I have to create a plasmoid first as a container, and those things keep doing weird stuff that drives every user crazy. With one false move of your mouse, it might be gone, change shape, move to another place or whatever.

  • I also don't like the desktop search that eats resources like there is no tomorrow (disk space, disk I/O, CPU usage) and that for all practical purposes you can't get rid of.

  • I don't like the fact that the mail client relies on that MySQL based framework called Akonadi that is not only resource-hungry, but also so fragile that I had to use the akonadiconsole lots of times just to bring it back to life. Seriously, if I as a Linux system developer have a hard time doing that, what is a normal user expected to do?

  • Activities vs. multiple desktops. I tried to use both, but they don't integrate well. The desktops previewer is far inferior to the old one from KDE3: Only monochrome rectangles, no real preview. The activities plasmoid keeps rearranging my carefully placed and named activities at random. WTF?!

  • Everything is so fragmented that not even the naming is clear anymore. What used to be KDE is now a jumble of the KF Framework, the KF libs, the KF apps and the Plasma desktop. Yeah, great job, folks; people used to know what KDE stood for. Nobody knows what the hell all those components are, and neither does anybody care anymore. You paved your way to oblivion with buzzwords. Great marketing strategy for gaining more visibility!

Then the next generation KDE arrived, Plasma 5. When I was force-migrated to it at work with the SUSE Tumbleweed rolling release, the experience was so bad that I moved to the Xfce Desktop.

Now every time I started my own KDirStat, it started about a dozen KDE processes along with it -- processes that it needs only for minor things like loading icons or translations. I really don't need or want that.

So it was time to make KDirStat self-sufficient; it never used that much of all the KDE infrastructure anyway. Time to make a pure Qt-based and self-sufficient QDirStat.

And while I was at it, I took the chance to add some features that I had wanted for a long time, yet I had never gotten myself to start working on:

  • Multi-selection in the directory tree so you can delete several files at once.

  • Remove limitations like having only a fixed number of user-defined cleanup actions.

  • Properly show the output of cleanup actions, in particular when they reported errors.

  • Make treemap colors configurable: Use custom colors and match them to user-defined filename extensions.

  • Move away from the arcane KDE build system: Back with KDE 1/2/3 it was the Autotools with custom KDE extensions that only a handful people in the world really understood (I was not among them), later CMake which is little better, just differently confusing.

Yes, there is a Qt4 / Qt5 port of KDirStat called K4DirStat. K4DirStat is an independent project that started when I had not worked on the old KDirStat for a long time (my last KDirStat release had been in mid-2006).

QDirStat is based on that same code from the 2006 KDirStat. It's an 80% rewrite using a lot of newer Qt technologies. And there was a lot of cleaning up that old code base that had been long overdue.

Features

New Features

  • Multi-selection:

    • Both views (the tree and the treemap) now support extended selection, i.e. you can select more than one item. This was the most requested feature for the last KDirStat. Now you can select more than one item at the same time to move it to the trash can, to directly delete it or whatever.

    • Tree view:

      • Shift-click: Select a range of items.
      • Ctrl-Click: Select an additional item or deselect a selected one.
    • {Treemap](doc/Treemap.md):

      • Ctrl-Click: Select an additional item or deselect a selected one.

      • The current item is highlighted with a red rectangle, all other selected ones with a yellow rectangle. If the current item is not also selected, it has a dotted red outline.

      • Middle click: This does the same as a left click, plus it also highlights the parent directories of the current item. Everything outside those ancestors is slightly dimmed. If the same item is middle-clicked again, that highlighting is removed.

        This also works with Ctrl-middle click and Shift-middle click.

  • Proper output of cleanup actions with different colors for the commands that are executed, for their output and for error messages (see screenshot above). That output window can be configured to always open, to open after a certain (configurable) timeout, or only if there are error messages -- or not at all, of course. If things go wrong, you can kill the external command started by the cleanup action from there. You can zoom in and out (increase or decrease the font size) as you like.

  • File type statistics window. WinDirStat has it, and users wanted it in QDirStat, too. Since filename extensions (suffixes) don't have as much semantics in Linux/Unix systems as they do in Windows, many files are categorized as "Other". This is a known limitation, but it's a limitation of the whole concept of using suffixes to categorize files by type. And no, checking file headers for magic byte sequences like the "file" command does is not an option here; QDirStat would have to do that for (at least) all the 30,000+ files typically listed under the "Other" category. So we'll have to live with that limitation.

  • Locate files by file type window. If you double-click on any of the filename extensions (suffixes) in the file type statistics window, you will get another window that lists all the directories that contain files of that type including the number and total size of those files. You can double-click each of those lines, and that directory will open in the main window with the files of that type preselected so you can start cleanup actions like moving them to trash or converting them to a better format (.bmp -> .png) immediately.

  • File size statistics window with histogram, percentiles, buckets and a lot of documentation that everybody should be able to understand. Even if (or, better yet, in particular if) your math teacher or statistics professor never explained it properly, please have a look at it.

  • File age statistics window: This lists the number and total size of changed files by years and for recent (13-24) months. You can see in what time frame there was any activity (i.e. any changes) in a directory tree, i.e. when it last was in active use; or if it might be a good candidate to be moved to archive media.

  • Packages view: Show installed packages and their files in the tree. Supported for all Linux distributions using any of dpkg, rpm, pacman as their low-level package manager or any higher-level package manager like apt, zypper etc.; more details at Pkg-View.md.

  • Unpackaged files view: Show a directory tree, but ignore all files that belong to an installed software package. Those ignored files are displayed in a special branch in the tree view, and they are not displayed at all in the treemap. This is useful to find files that were manually installed by a sudo make install command. More details at Unpkg-View.md.

  • New macros to use in cleanup actions:

    • %d : Directory name with full path. For directories, this is the same as %p. For files, this is their parent directory's %p.

    • %terminal : Terminal window application of the current desktop; one of "konsole", "gnome-terminal", "xfce4-terminal", "lxterminal", "eterm". The fallback is "xterm".

    • %filemanager : File manager application of the current desktop; one of "konqueror", "nautilus", "thunar", "pcmanfm". The fallback is "xdg-open".

  • Which desktop is used is determined by the $XDG_CURRENT_DESKTOP environment variable. Users can override this with the $QDIRSTAT_DESKTOP environment variable, so you can get, say, the Xfce terminal or file manager despite currently running KDE if you set

    export QDIRSTAT_DESKTOP="Xfce"
    
  • Of course, you can still simply use your favourite file manager if you simply change %filemanager in the default "Open File Manager Here" cleanup action to the command to start it.

  • You can now select the shell to use for the cleanup commands:

    • $SHELL (the user's login shell) - using the same environment, syntax and wildcard etc. behaviour of the shell the user is used to.
    • /bin/bash for well-defined behaviour for wildcards etc.
    • /bin/sh as a last resort (which might be a simplistic dash on Ubuntu).
  • Mouse actions in the treemap window:

    • Left click: Select item and make it the current item.
    • Right click: Open the context menu with cleanup actions and more.
    • Ctrl+Left click: Add item to selection or toggle selection.
    • Middle click: Like left click, but also show directory borders.
    • Ctrl+Middle click: Like Ctrl+left click, but also show directory borders.
    • Double click left: Zoom treemap in.
    • Double click middle: Zoom treemap out.
    • Mouse wheel: Zoom treemap in or out.
  • You can configure what columns to display in the tree view and in which order. The only thing that is fixed is the "Name" column which is always there and always the first (leftmost). Use the context menu in the tree header to unlock column widths. Drag columns to the left or right to change their order.

  • Exclude rules are now greatly simplified. They no longer always get the entire path to match which requires quite complex regexps; by default, they only get the last path component -- i.e., no longer "/work/home/sh/src/qdirstat/src/.git", but only ".git". You can now even tell the exclude rule to use a simplified syntax: "FixedString" or "Wildcard" in addition to the normal "RegExp". The old behaviour (matching against the full path) is still available, though.

  • Configuration dialog for exclude rules -- see screenshots.

  • "Find" function for files, directories and symlinks: Search the scanned tree for them by name with wildcards, regular expressions or fixed strings ("begins with", "ends with", "contains").

  • Bookmarks for directories that you visit often.

  • Subvolume detection for Btrfs. Btrfs subvolumes are just ordinary mount points, so normally QDirStat would stop scanning there, leaving a large part of a Btrfs partition unaccounted for. But for each mount point found while scanning a directory tree, QDirStat checks /proc/mounts or /etc/mtab if it has the same device name as its parent directory, and if yes, considers it a subvolume and continues scanning.

  • Actions to go one directory level higher or to the toplevel: Context menu and menu "Go To" -> "Up One Level" or "Toplevel". This is useful if you clicked on a file in the treemap that is deep down in some subdirectory, and you want to know what subdirectory that is: Simply click "Go Up" twice (the first click will get you to the pseudo subdirectory, the second one to the real one).

  • Open all tree branches up to a certain level and close all other ones: Menu "View" -> "Expand Tree To Level" -> "Level 0" ... "Level 9".

  • The total sum of the selected items (subtrees) is displayed in the status line if more than one item is selected.

  • Icons are now compiled into the source thanks to Qt's resource system; now it's just one binary file, and nothing will go missing. No more dozens of little files to handle.

  • The build system is now Qt's QMake. I got rid of that AutoTools (Automake, Autoconf, Libtool) stuff that most developers find intimidating with its crude M4 macro processor syntax. QMake .pro files are so much simpler, and they do the job just as well. And no, it will definitely never be CMake: I don't like that thing at all. It's just as much as a PITA as the AutoTools, just not as portable, no usable documentation, it's changing all the time, and those out-of-source builds are a royal PITA all on their own with constantly having to change back and forth between source and build directories.

  • QDirStat now has its own log file. It now logs to /tmp/qdirstat-$USER/qdirstat.log (where $USER is your Linux user name). No more messages on stdout that either clobber the shell you started the program from or that simply go missing.

  • No longer depending on dozens of KDE libs and a lot of KDE infrastructure; it now only requires Qt which is typically installed anyway on a Linux / BSD / Unix machine with any X11 (graphical) desktop.

  • It should still compile and work with Qt4. We now have a contributor who is very interested in that (Michael Matz), so it should be possible to maintain this compatibility.

  • Slow down display update from 333 millisec (default) to 3 sec (default) with qdirstat --slow-update or qdirstat -s. The slow update interval can be customized in ~/.config/QDirStat/QDirStat.conf:

    [DirectoryTree]
    SlowUpdateMillisec = 3000

Old Features

Features ported from the old KDirStat:

  • Fast and efficient directory reading.

  • Not crossing filesystem boundaries by default so you can see what eats up all the disk space on your root filesystem without getting distorted numbers due to all the other filesystems that are mounted there. If you absolutely wish, you can use "Continue reading at mount point" from the context menu or from the "File" menu -- or configure QDirStat to always read across file systems.

  • Efficient memory usage. A modern Linux root filesystem has well over 800,000 objects (files, directories, symlinks, ...) and about 100,000 directories. This calls for minimalistic C++ objects to represent each one of them. QDirStat / KDirStat do their best to minimize that memory footprint.

  • Hierarchical tree view that displays accumulated sums in each branch, together with a percent bar so you can see at a glimpse how the subdirectories compare with each other.

  • All numbers displayed human readable -- e.g., 34.4 MB instead of 36116381 Bytes.

  • All size units are 1024-based, i.e. 1 kB = 1024 Bytes; 1 MB = 1024 kB; 1 GB = 1024 MB.

  • In the tree, also displaying the exact byte size as the context menu (right click).

  • Each tree level uses another color for that percent bar so you can easily compare subdirectories even if some of them are opened in the tree.

  • If a directory has files and subdirectories, all files in that subdirectory are grouped into a pseudo directory (called dot entry in the QDirStat sources) so you can compare the disk usage of files on that directory level with the subdirectories.

  • Displaying the latest modification time of any object in each branch. You can instantly see in what subdirectory where any changes lately. You can sort by this column, of course.

  • Treemap display. Treemaps are a way to visualize hierarchical data structures, invented by Ben Shneiderman. Basically, the hierarchy is flattened and each level grouped in a rectangle, inside which it is again subdivided in rectangles. The area of each rectangle corresponds to the size of each item or subdirectory. For the purposes of QDirStat, it is enough to know that a large blob corresponds to a large file; you can instantly see where large ISOs or movies are.

  • You can zoom the treemap in and out (Ctrl + / Ctrl - / mouse wheel / menu / tool bar) to see more details of directories that are otherwise dominated by larger ones.

  • You can move the boundary between treemap and tree view up and down as you like. You can also get rid of the treemap completely (menu "Treemap" -> "Show Treemap" or F9 key)

  • Treemap and tree list view communicate. Select an item in one view, and it is also selected in the other. If you click on that large blob in the treemap, it is located in the tree view, all branches up to its directory are opened, and the tree view scrolls to that item.

  • Cleanup actions. Once you know what is consuming the disk space, you can start cleanup actions from within QDirStat to reclaim disk space - or to investigate further if you can safely delete a file. You can create your own cleanup actions (as many as you like), and there are some predefined ones:

    • Open file manager here. This will start a file manager in the directory of the current item. QDirStat tries its best to guess the name of the relevant file manager application for the current desktop, based on the $XDG_CURRENT_DESKTOP environment variable. You can override this with the $QDIRSTAT_DESKTOP environment variable.

    • Open terminal window here. In most cases, this is much easier than to navigate to that directory with 'cd' in an already open terminal window and using tab-completion numerous times. As with the file manager application, QDirStat tries its best to guess the name of the relevant terminal window application for the current desktop.

    • Move to trash bin. QDirStat has its own implementation of the XDG trash specification.

    • Delete immediately.

    • Compress: Create a compressed tar archive from a directory and then delete the directory.

    • Delete junk files: Backup files left behind by editors, core dumps.

    • All predefined cleanup actions are fully configurable, of course. You can change any of them, disable them, or delete them.

  • You can copy the complete path of the selected file or directory to the system clipboard and paste it to another application.

  • Reading and writing cache files:

    • This is mostly meant for remote servers in some server room somewhere: Rather than installing the Qt and X11 runtime environment and running QDirStat over remote X (ssh with X forwarding), you can run the supplied qdirstat-cache-writer Perl script on the server, copy the resulting cache file to your desktop machine and view the content there with QDirStat.

    • For large directories (archives etc.) that don't change that much, you can also generate a QDirStat cache file (either with the Perl script or with QDirStat itself) and save it to that corresponding directory. If QDirStat finds a file .qdirstat.cache.gz in a directory, it checks if the toplevel directory in that cache file is the same as the current directory, and if it is, it uses the cache file for that directory rather than reading all subdirectories from disk. If you or the users of that machine use QDirStat often, this might take a lot of I/O load from the server.

    • If you use the '-l' option of the qdirstat-cache-writer script, it uses the long file format with a complete path for each entry, so you can use the zgrep command with it as a replacement for the locate command.

    • The KDirStat / QDirStat file format is well documented and very simple. It seems to be used by a number of admins and some backup software. See also the specification in the doc/ directory: https://github.com/shundhammer/qdirstat/blob/master/doc/cache-file-format.txt

    • You can specify a cache file to read directly at the command line:

      qdirstat --cache cache-file
      
  • Other command line options: See

    qdirstat --help
    

Features that are Gone

(Compared to the old KDirStat)

  • Pacman animation
  • KIO slave support
  • Feedback form
  • KPacman: That was that PacMan animation while reading directory reading. This is gone now. KPacMan looked out of place pretty soon after it got to KDirStat due to Qt styles doing fancy rendering of widget backgrounds with gradients etc. I know that it does have its fans, but it's unrealistic to get this back without breaking the menu bar rendering.

  • KioDirReadJob: Network-transparent directory reading for network protocols like FTP, HTTP, Fish (ssh-based). This depended on KDE's KIO slaves, so this functionality is gone now without KDE. That's a pity, but this is a little price to be paid to avoid the rest of the hassle with using the KDE libs.

  • KFeedback: That was that form where users could tell their opinion about KDirstat. But that was not used that often anyway - not nearly enough to justify the effort that has gone into that part. And the KDE usability people, like usability people generally tend to do, first discussed that to death and then decided they didn't want anything like that in general in KDE applications. So be it.

  • KActivityTracker: That was a supporting class for KFeedback that kept track of how much a user was using the program and after a while (when it was determined that it made sense) asked if the user wouldn't like to give his feedback about the program. Don't you all just hate those dumbass web designers who tell you to do a survey how much you like their grand web page before you even had a chance to look at it? Shove a pop-up up your face covering the stuff you are interesting in with their self-loving marketing bullshit? -- KActivityTracker was made to avoid exactly this: Ask the user only once you know that he actually used the program for a while.

macOS Compatibility

Ready-made Binaries for macOS

New 2024-02-13:

Platform binaries built by Jesus Herrera Arroyo [email protected]

at https://github.com/jesusha123/qdirstat-macos

(go to Releases at the right side panel)

and via Homebrew.

Building on macOS

See Jesus Herrera's build instructions.

Notice that those instructions are also based on using the original QDirStat sources from here, so you are not putting anything at risk.

Windows Compatibility

There is no native Windows version, but you can use the docker container. Other than that, there is WinDirStat.

There are currently no plans for doing a native Windows port.

Directory reading might be quite easy to replace for Windows; we don't have that problem with devices and crossing filesystems on that platform.

But the cleanups might be a challenge, "move to trash" works completely differently, and we'd need an installer for a Windows version.

So, for the time being, use the docker or WinDirStat instead.

WinDirStat is a close relative to the KDirStat family anyway; the author had liked KDirStat on Linux so much that he decided to write a Windows clone and called it WinDirStat.

Ready-made Packages

Packaging status

openSUSE / SUSE Linux Enterprise

QDirStat packages for openSUSE Tumbleweed / Leap 15.x and SLE (15, 12) (Notice that Leap 15.3 is wrongly sorted into the SLE category, not openSUSE as it should):

  • Download page for the latest stable release

  • Download page for the current development version (git master)

    Since this version is in development, it may be not quite as stable and reliable as the latest official stable release, although the QDirStat developers try their best to keep it as stable as possible.

Ubuntu

https://packages.ubuntu.com/search?keywords=qdirstat&searchon=names

Debian

https://packages.debian.org/search?keywords=qdirstat

Fedora

https://packages.fedoraproject.org/pkgs/qdirstat/qdirstat/

QDirStat Docker Containers

There are currently two publicly available docker containers for QDirStat:

(see their respective release pages for more detailed information about the QDirStat version they provide)

Those containers make QDirStat usable even on non-Linux / non-Unix systems such as Windows or macOS.

Docker is basically a virtualized environment to run software that was designed for a different operating system.

It is very much like using VmWare or VirtualBox, but with much less overhead: You don't have to install that other system first and then on top of that the application that you really want to run. A docker container contains everything that is needed, and it is preconfigured for that application.

How to use Docker on Windows

  • Download and install Docker Desktop for Windows
  • Use the Docker Desktop for Windows to launch the QDirStat Docker (as a Linux container)
  • Adapt the command line so the disk that you want to explore is used

More information:

Building

Notice that for most mainstream Linux or BSD distributions you don't have to build your own; you can simply install a ready-made package from your normal package manager.

Build Environment

Make sure you have a working Qt 5 build environment installed. This includes:

  • C++ compiler (gcc recommended)
  • Qt 5 runtime environment
  • Qt 5 header files
  • libz (compression lib) runtime and header file

If anything doesn't work, first of all make sure you can build any of the simple examples supplied with Qt, e.g. the calculator example.

Ubuntu

Install the required packages for building:

sudo apt-get install build-essential qtbase5-dev zlib1g-dev

Dependent packages will be added automatically.

Recommended packages for developers:

sudo apt-get install qttools5-dev-tools qtbase5-doc qtbase5-doc-html qtbase5-examples

See also

https://askubuntu.com/questions/508503/whats-the-development-package-for-qt5-in-14-04

If you also have a Qt4 development environment installed, select the desired one via qtchooser:

sudo apt-get install qtchooser
export QT_SELECT="qt5"

SUSE

Install the required packages for building:

sudo zypper install -t pattern devel_C_C++
sudo zypper install libQt5Widgets-devel libqt5-qttools zlib-devel

If you also have a Qt4 development environment installed, make sure that the Qt5 version of 'qmake' is the first in your $PATH:

export PATH=/usr/lib64/qt5/bin:$PATH

Compiling

Open a shell window, go to the QDirStat source directory, then enter these commands:

qmake
make

Installing

sudo make install

or

su -c make install

Install to a Custom Directory

The default setup installs everything to /usr. To install to another directory, set INSTALL_PREFIX during qmake.

qmake INSTALL_PREFIX=/usr/local

Beware that some things might not work as expected; for example, you will not get a .desktop file in the proper place to make QDirStat appear in any menus in your graphical desktop environment or in the file manager. You will need to copy the .desktop file manually to whatever directory your graphical desktop environment uses somewhere in your home directory. Similar with the application icon used in that .desktop file.

Contributing

See file Contributing.md and GitHub-Workflow.md

Troubleshooting

Can't Move a Directory to Trash

See file Troubleshooting.md

Further Reading

Of course, don't forget to check out the doc directory.

Packaging Status

Repology: QDirStat versions in Linux / BSD distributions:

Repology

(click for details)

Donate

QDirStat is Free Open Source Software.

If you find it useful, please consider donating. You can donate any amount of your choice via PayPal:

paypal

qdirstat's People

Contributors

0-wiz-0 avatar a1346054 avatar buxit avatar bwalle avatar clach04 avatar dalbitresb12 avatar flurbius avatar hubcapp avatar jlesage avatar kernelb00t avatar lithopsian avatar luzpaz avatar nhellfire avatar oblivioncth avatar pepelevamp avatar phiresky avatar shundhammer avatar slodki avatar smile4ever avatar susematz avatar teras avatar tsweet64 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

qdirstat's Issues

incorrect handling of sparse files with 0 allocated blocks

If a file has 0 allocated blocks but has a logical size which is greater than 0, the file will not be detected as "sparse"; instead, their logical size will be used as actual size.

To create such a file, run eg. dd if=/dev/zero of=test.bin bs=1M seek=1000 count=0; this creates a sparse file which uses 0 blocks of space but has a logical size of 1000 MB. Qdirstat displays a misleading size of 1000 MB for this file.
If you run dd if=/dev/zero of=test.bin bs=1M seek=1000 count=1 instead, the file uses 2048 blocks and has a logical size of 1001 MB. For this file, qdirstat correctly shows a size of "1001 MB (allocated: 1.0 MB)".

This was observed on an ext4 file system, with latest qdirstat (f33cba3).
The issue does not occur with k4dirstat 2.7.8-4-ge61717f.

Linker error on OS X (10.9)

During make, encountered a linker error related to 64-bit arch:

clang++ -headerpad_max_install_names -stdlib=libc++ -mmacosx-version-min=10.7 -arch x86_64 -o .app/Contents/MacOS/ -F/usr/local/Cellar/qt/4.8.6/lib -L/usr/local/Cellar/qt/4.8.6/lib -framework QtGui -L/opt/X11/lib -L/usr/local/Cellar/qt/4.8.6/lib -F/usr/local/Cellar/qt/4.8.6/lib -framework QtCore
Undefined symbols for architecture x86_64:
"_main", referenced from:
start in crt1.10.6.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [.app/Contents/MacOS] Error 1
make: *** [sub-scripts-make_default-ordered] Error 2

scroll to selection sometimes fails

this is minor:

when clicking around in the treemap the listview on top sometimes does not scroll to correct position to make the selected item visible. i'm not sure what exactly it depends on. i can mostly get back to the right item by selecting a different rectangle and then selecting the intended rectangle again. selecting something on the very bottom right and then coming back towards top-left improves the chances of the intended selection getting visible in the list view.

[Qt4] Files and directories with UTF-8 special characters in the name not read correctly

version: 1.3
system: Ubuntu zesty
package: 1.3-1~zesty (amd64)

$ ls -lR
.:
razem 112
-rw-rw-r-- 1 slodki slodki 51200 maj 31 19:51 file3_ą
-rw-rw-r-- 1 slodki slodki 51200 maj 31 19:51 file4
drwxrwxr-x 2 slodki slodki  4096 maj 31 19:51 krowa
drwxrwxr-x 2 slodki slodki  4096 maj 31 19:51 żółw

./krowa:
razem 52
-rw-rw-r-- 1 slodki slodki 51200 maj 31 19:51 file1

./żółw:
razem 52
-rw-rw-r-- 1 slodki slodki 51200 maj 31 19:51 file2
$ locale
LANG=pl_PL.UTF-8
LANGUAGE=
LC_CTYPE="pl_PL.UTF-8"
LC_NUMERIC="pl_PL.UTF-8"
LC_TIME="pl_PL.UTF-8"
LC_COLLATE="pl_PL.UTF-8"
LC_MONETARY="pl_PL.UTF-8"
LC_MESSAGES="pl_PL.UTF-8"
LC_PAPER="pl_PL.UTF-8"
LC_NAME="pl_PL.UTF-8"
LC_ADDRESS="pl_PL.UTF-8"
LC_TELEPHONE="pl_PL.UTF-8"
LC_MEASUREMENT="pl_PL.UTF-8"
LC_IDENTIFICATION="pl_PL.UTF-8"
LC_ALL=

All files and directories with polish (or Cyrillic) characters are skipped/ignored in QDirStat:
qdirstat-utf8

Works without problems in all other KDE/QT/CLI apps:
dolphin-utf8

Crash without useful error message when no display available

sshing into my headless server with X window forwarding not set up, I get a crash and core dump because there's no display to attach to. This is stupid and PEBKAC, but maybe this case can be cleaned up to not crash.

➜  qdirstat git:(master) ./src/qdirstat
Logging to /tmp/qdirstat-1000.log
[1]    26606 abort (core dumped)  ./src/qdirstat
➜  qdirstat git:(master) cat /tmp/qdirstat-1000.log
2016-12-06 17:53:40.631 [26606] <Info>    Logger.cpp:75 Logger():  -- Log Start --
2016-12-06 17:53:40.638 [26606] <ERROR>   :0 ():  QXcbConnection: Could not connect to display

Refresh a file/folder only

This is very useful when cleaning up a folder and wanting to refresh that file/folder only instead of the whole tree, as this can be very slow on HDDs.

WinDirStat has this feature and I'd love to see it in QDirStat too!

NullPointerException when reading cache file

When opening a cache file generated with the qdirstat-cache-writer script, qdirstat starts displaying the directory tree and then terminates with a NullPointerException. Backtrace:

#0  0x00007ffff54ad107 in raise () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#1  0x00007ffff54ae4e8 in abort () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#2  0x00007ffff5d98b3d in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
No symbol table info available.
#3  0x00007ffff5d96bb6 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
No symbol table info available.
#4  0x00007ffff5d96c01 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
No symbol table info available.
#5  0x00007ffff5d96e19 in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
No symbol table info available.
#6  0x0000000000418e8a in _throw_helper<NullPointerException> (exception=..., logger=0x0, srcFile=..., srcLine=486, 
    srcFunction=...) at Exception.h:288
No locals.
#7  0x0000000000446682 in QDirStat::DirTreeModel::index (this=0x7edc90, row=23, column=0, parentIndex=...)
    at DirTreeModel.cpp:486
        parent = 0xd31270
        __FUNCTION__ = "index"
        child = 0x0
#8  0x00007ffff77394c1 in QTreeViewPrivate::layout(int, bool, bool) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
No symbol table info available.
#9  0x00007ffff7739db6 in QTreeView::expandToDepth(int) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
No symbol table info available.
#10 0x0000000000455ad3 in MainWindow::expandTreeToLevel (this=0x7fffffffe100, level=1) at MainWindow.cpp:516
No locals.
#11 0x0000000000454d2d in MainWindow::idleDisplay (this=0x7fffffffe100) at MainWindow.cpp:394
        sortCol = 32767
#12 0x0000000000454e25 in MainWindow::readingFinished (this=0x7fffffffe100) at MainWindow.cpp:412
        __FUNCTION__ = "readingFinished"
(More stack frames follow...)

The cache file is from a separate machine, so the actual directory structure is not accessible for qdirstat. The same cache file works fine when opened in k4dirstat after changing the header to [kdirstat 4.0 cache file]. Unfortunately, I can't share this particular cache file and haven't yet managed to reproduce this error on another file.
It might also be interesting that according to the logfile, the last child is <Files>:

2016-01-17 15:09:56.268 [1264] <ERROR>   DirTreeModel.cpp:180 findChild():  Child #23 is out of range: 0..22 children for /hom
e/freak/
2016-01-17 15:09:56.268 [1264] <Debug>   DebugHelpers.cpp:55 dumpChildrenList():  Children of /home/freak/
...
2016-01-17 15:09:56.269 [1264] <Debug>   DebugHelpers.cpp:59 dumpChildrenList():      #22: /home/freak//<Files>
2016-01-17 15:09:56.269 [1264] <WARNING> DirTreeModel.cpp:486 index():  THROW Exception: Null pointer

If I can do something more to help investigate this, please let me know.

Log file world-readable with umask 022 and in fixed /tmp location

Actually there are 2 problems with the log file... I will start with the security one...

Problem 1: Being written in /tmp , the log file is readable by anyone since in this folder when creating files their permissions usually are set to 644... A small change in src/Logger.cpp constructor is needed... Adding some QFile::setPermissions would help great to limit the reading at least to user and group, so no user sensitive info from the log leaks...

Problem 2: The log file location is hardcoded to /tmp... This better be coded using either QStandardPaths::TempLocation or some of the env variables like TMPDIR on Linux, or TEMP on Windows....

Integrate the file stats and directories with the main window

How I imagine this to look/be positioned - http://i.imgur.com/e77oD7R.png

I think this would be a great default option with the ability to resize all 3 windows and be able to pop them out so they act like they currently do for people who'd like to use them as such

With the way it currently is it feels cluttery on a lower than FHD res screen, and I'd like this even on my FHD screen(currently using lower res TV).

  • Being tracked here too #52

Also when the directory listing pops out it ignores the last position it was at, it'd be great if it opened at the last position.

  • Fixed! Thanks!

And as a small side note - it is great to open the file stats menu by F3, would be even better if it worked as toggle and F3 also closed it if it is open.

  • Implemented, thanks!

And Thank You so much for implementing the file stats feature and making it even better by adding file listings, it makes it so much more useable for me and the listing of files by directories makes it even better than WinDirStat, especially the synergy between all 3 windows is very cool!.

Subfolders are swapped while scanning

To reproduce:

  1. Scan a large folder
  2. While scanning, click the arrow icon to show the subtree of a folder
  3. The shown subtree sometimes actually belongs to a different directory

Example: Here the contents of /etc are shown as the contents of /usr
2016-08-19-19-06-48

Support for IEC binary prefixes/units

In my opinion Qdirstat should support displaying IEC binary prefixes/units for file sizes: KiB/MiB/GiB/TiB (powers of 1024) instead of (or in addition to) KB/MB/GB/TB (power of 1000). What do you think?

parent directory stays selected after deleting a file

  1. select a file in treemap
  2. right-click on the file in treemap
  3. delete (no way to undelete)
  4. yes
  5. now parent directory of the file is selected.
  6. in treemap select a different file in a different directory.
  7. right-click on the file in treemap
  8. delete (no way to undelete)

the parent directory of the previously deleted file is in the list of files to be deleted

this made me delete a directory i actually didn't intend to delete, so i consider this to be a grave bug.

qdirstat is slow on remote X servers

When I run qdirstat on a local X server, it finishes almost immediately, but when I use ssh -X it is very slow. If I attach strace, it's doing a lot of polling on file descriptors 5 (a socket, presumably the X server) and 7 (an eventfd). [Incidentally, it's also statting /etc/localtime dozens of times, but this doesn't seem to be where it's blocking].

Is there a way to limit the amount that it tries to update the window? It seems to be counting down "read jobs" one at a time, and taking about a quarter of a second for each update.

Internal cache writer generates incorrect files

qdirstat /   

-> 7.8 GB total

Menu "File" -> "Write to Cache File" -> save as file "root-internal.cache.gz"

qdirstat -c root-internal.cache.gz   

-> 457 MB total

qdirstat-cache-writer / root-script.cache.gz

qdirstat -c root-script.cache.gz

-> 7.8 GB total

Filenames with non-UTF-8 characters

Hello,
Nice to found this useful tool.

I have a problem. If a sub folder contains non-English characters, it cannot scanned. Also, the chars shown weird.

For example in Turkish,
"İnanç Esasları" shown as "Ä°nanç Esasları"

Thank you.

qdirstat.desktop file: Exec key value

Enclosing the field code in double quotes means that if QDirStat is run without parameters, it assumes the current directory is to be opened. Expected behaviour would surely be to prompt for the directory to open, if there is no directory parameter specified?

Also, perhaps it would be helpful to add mount point mime-type to MimeType key value.

Suggested changes:
Exec=qdirstat %u
MimeType=inode/directory;inode/mount-point;

Cleanup op on multiple files causes segmentation fault

Create a cleanup action that "Works For... Files" with "Refresh Policy: Refresh This Item". Select more than one file and run the action. The action is performed, and qdirstat crashes afterwards.

Does not happen with directories, single files, or "Refresh This Item's Parent".

Valgrind output:

==28354== Invalid read of size 8
==28354== at 0x44761D: QDirStat::DirTree::refresh(QDirStat::FileInfoSet const&) (DirTree.cpp:144)
==28354== by 0x499E89: QDirStat::Refresher::refresh() (Refresher.cpp:35)
==28354== by 0x4B16E6: QDirStat::Refresher::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_Refresher.cpp:69)
==28354== by 0x5EDDD29: QMetaObject::activate(QObject*, int, int, void**) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.5.1)
==28354== by 0x4B13C0: OutputWindow::lastProcessFinished(int) (moc_OutputWindow.cpp:209)
==28354== by 0x4931E6: OutputWindow::processFinished(int, QProcess::ExitStatus) (OutputWindow.cpp:232)
==28354== by 0x4B1128: OutputWindow::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_OutputWindow.cpp:149)
==28354== by 0x5EDDD29: QMetaObject::activate(QObject*, int, int, void**) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.5.1)
==28354== by 0x5DDCA6E: QProcess::finished(int, QProcess::ExitStatus) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.5.1)
==28354== by 0x5DE52AB: ??? (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.5.1)
==28354== by 0x5DE5448: ??? (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.5.1)
==28354== by 0x5EDDD29: QMetaObject::activate(QObject*, int, int, void**) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.5.1)
==28354== Address 0x1b75e5f0 is 0 bytes inside a block of size 104 free'd
==28354== at 0x4C2F24B: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==28354== by 0x45D90D: QDirStat::FileInfo::~FileInfo() (FileInfo.cpp:158)
==28354== by 0x43B8D3: QDirStat::DirInfo::clear() (DirInfo.cpp:119)
==28354== by 0x4478DB: QDirStat::DirTree::refresh(QDirStat::DirInfo*) (DirTree.cpp:183)
==28354== by 0x447689: QDirStat::DirTree::refresh(QDirStat::FileInfoSet const&) (DirTree.cpp:147)
==28354== by 0x499E89: QDirStat::Refresher::refresh() (Refresher.cpp:35)
==28354== by 0x4B16E6: QDirStat::Refresher::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_Refresher.cpp:69)
==28354== by 0x5EDDD29: QMetaObject::activate(QObject*, int, int, void**) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.5.1)
==28354== by 0x4B13C0: OutputWindow::lastProcessFinished(int) (moc_OutputWindow.cpp:209)
==28354== by 0x4931E6: OutputWindow::processFinished(int, QProcess::ExitStatus) (OutputWindow.cpp:232)
==28354== by 0x4B1128: OutputWindow::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_OutputWindow.cpp:149)
==28354== by 0x5EDDD29: QMetaObject::activate(QObject*, int, int, void**) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.5.1)
==28354== Block was alloc'd at
==28354== at 0x4C2E0EF: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==28354== by 0x4430AD: QDirStat::LocalDirReadJob::startReading() (DirReadJob.cpp:272)
==28354== by 0x441D11: QDirStat::DirReadJob::read() (DirReadJob.cpp:58)
==28354== by 0x444CAE: QDirStat::DirReadJobQueue::timeSlicedRead() (DirReadJob.cpp:545)
==28354== by 0x4AE41B: QDirStat::DirReadJobQueue::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_DirReadJob.cpp:253)
==28354== by 0x5EDDD29: QMetaObject::activate(QObject*, int, int, void**) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.5.1)
==28354== by 0x5EEA5C7: QTimer::timerEvent(QTimerEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.5.1)
==28354== by 0x5EDEBB2: QObject::event(QEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.5.1)
==28354== by 0x51AF05B: QApplicationPrivate::notify_helper(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.5.1)
==28354== by 0x51B4515: QApplication::notify(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.5.1)
==28354== by 0x5EAF38A: QCoreApplication::notifyInternal(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.5.1)
==28354== by 0x5F045EC: QTimerInfoList::activateTimers() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.5.1)
==28354==
==28354== Invalid read of size 8
==28354== at 0x423EC6: QDirStat::FileInfo::parent() const (FileInfo.h:342)
==28354== by 0x447661: QDirStat::DirTree::refresh(QDirStat::FileInfoSet const&) (DirTree.cpp:146)
==28354== by 0x499E89: QDirStat::Refresher::refresh() (Refresher.cpp:35)
==28354== by 0x4B16E6: QDirStat::Refresher::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_Refresher.cpp:69)
==28354== by 0x5EDDD29: QMetaObject::activate(QObject*, int, int, void**) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.5.1)
==28354== by 0x4B13C0: OutputWindow::lastProcessFinished(int) (moc_OutputWindow.cpp:209)
==28354== by 0x4931E6: OutputWindow::processFinished(int, QProcess::ExitStatus) (OutputWindow.cpp:232)
==28354== by 0x4B1128: OutputWindow::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_OutputWindow.cpp:149)
==28354== by 0x5EDDD29: QMetaObject::activate(QObject*, int, int, void**) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.5.1)
==28354== by 0x5DDCA6E: QProcess::finished(int, QProcess::ExitStatus) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.5.1)
==28354== by 0x5DE52AB: ??? (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.5.1)
==28354== by 0x5DE5448: ??? (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.5.1)
==28354== Address 0x1b75e640 is 80 bytes inside a block of size 104 free'd
==28354== at 0x4C2F24B: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==28354== by 0x45D90D: QDirStat::FileInfo::~FileInfo() (FileInfo.cpp:158)
==28354== by 0x43B8D3: QDirStat::DirInfo::clear() (DirInfo.cpp:119)
==28354== by 0x4478DB: QDirStat::DirTree::refresh(QDirStat::DirInfo*) (DirTree.cpp:183)
==28354== by 0x447689: QDirStat::DirTree::refresh(QDirStat::FileInfoSet const&) (DirTree.cpp:147)
==28354== by 0x499E89: QDirStat::Refresher::refresh() (Refresher.cpp:35)
==28354== by 0x4B16E6: QDirStat::Refresher::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_Refresher.cpp:69)
==28354== by 0x5EDDD29: QMetaObject::activate(QObject*, int, int, void**) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.5.1)
==28354== by 0x4B13C0: OutputWindow::lastProcessFinished(int) (moc_OutputWindow.cpp:209)
==28354== by 0x4931E6: OutputWindow::processFinished(int, QProcess::ExitStatus) (OutputWindow.cpp:232)
==28354== by 0x4B1128: OutputWindow::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_OutputWindow.cpp:149)
==28354== by 0x5EDDD29: QMetaObject::activate(QObject*, int, int, void**) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.5.1)
==28354== Block was alloc'd at
==28354== at 0x4C2E0EF: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==28354== by 0x4430AD: QDirStat::LocalDirReadJob::startReading() (DirReadJob.cpp:272)
==28354== by 0x441D11: QDirStat::DirReadJob::read() (DirReadJob.cpp:58)
==28354== by 0x444CAE: QDirStat::DirReadJobQueue::timeSlicedRead() (DirReadJob.cpp:545)
==28354== by 0x4AE41B: QDirStat::DirReadJobQueue::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_DirReadJob.cpp:253)
==28354== by 0x5EDDD29: QMetaObject::activate(QObject*, int, int, void**) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.5.1)
==28354== by 0x5EEA5C7: QTimer::timerEvent(QTimerEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.5.1)
==28354== by 0x5EDEBB2: QObject::event(QEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.5.1)
==28354== by 0x51AF05B: QApplicationPrivate::notify_helper(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.5.1)
==28354== by 0x51B4515: QApplication::notify(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.5.1)
==28354== by 0x5EAF38A: QCoreApplication::notifyInternal(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.5.1)
==28354== by 0x5F045EC: QTimerInfoList::activateTimers() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.5.1)
==28354==
==28354== Invalid read of size 8
==28354== at 0x423EC6: QDirStat::FileInfo::parent() const (FileInfo.h:342)
==28354== by 0x447677: QDirStat::DirTree::refresh(QDirStat::FileInfoSet const&) (DirTree.cpp:147)
==28354== by 0x499E89: QDirStat::Refresher::refresh() (Refresher.cpp:35)
==28354== by 0x4B16E6: QDirStat::Refresher::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_Refresher.cpp:69)
==28354== by 0x5EDDD29: QMetaObject::activate(QObject*, int, int, void**) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.5.1)
==28354== by 0x4B13C0: OutputWindow::lastProcessFinished(int) (moc_OutputWindow.cpp:209)
==28354== by 0x4931E6: OutputWindow::processFinished(int, QProcess::ExitStatus) (OutputWindow.cpp:232)
==28354== by 0x4B1128: OutputWindow::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_OutputWindow.cpp:149)
==28354== by 0x5EDDD29: QMetaObject::activate(QObject*, int, int, void**) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.5.1)
==28354== by 0x5DDCA6E: QProcess::finished(int, QProcess::ExitStatus) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.5.1)
==28354== by 0x5DE52AB: ??? (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.5.1)
==28354== by 0x5DE5448: ??? (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.5.1)
==28354== Address 0x1b75e640 is 80 bytes inside a block of size 104 free'd
==28354== at 0x4C2F24B: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==28354== by 0x45D90D: QDirStat::FileInfo::~FileInfo() (FileInfo.cpp:158)
==28354== by 0x43B8D3: QDirStat::DirInfo::clear() (DirInfo.cpp:119)
==28354== by 0x4478DB: QDirStat::DirTree::refresh(QDirStat::DirInfo*) (DirTree.cpp:183)
==28354== by 0x447689: QDirStat::DirTree::refresh(QDirStat::FileInfoSet const&) (DirTree.cpp:147)
==28354== by 0x499E89: QDirStat::Refresher::refresh() (Refresher.cpp:35)
==28354== by 0x4B16E6: QDirStat::Refresher::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_Refresher.cpp:69)
==28354== by 0x5EDDD29: QMetaObject::activate(QObject*, int, int, void**) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.5.1)
==28354== by 0x4B13C0: OutputWindow::lastProcessFinished(int) (moc_OutputWindow.cpp:209)
==28354== by 0x4931E6: OutputWindow::processFinished(int, QProcess::ExitStatus) (OutputWindow.cpp:232)
==28354== by 0x4B1128: OutputWindow::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_OutputWindow.cpp:149)
==28354== by 0x5EDDD29: QMetaObject::activate(QObject*, int, int, void**) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.5.1)
==28354== Block was alloc'd at
==28354== at 0x4C2E0EF: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==28354== by 0x4430AD: QDirStat::LocalDirReadJob::startReading() (DirReadJob.cpp:272)
==28354== by 0x441D11: QDirStat::DirReadJob::read() (DirReadJob.cpp:58)
==28354== by 0x444CAE: QDirStat::DirReadJobQueue::timeSlicedRead() (DirReadJob.cpp:545)
==28354== by 0x4AE41B: QDirStat::DirReadJobQueue::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_DirReadJob.cpp:253)
==28354== by 0x5EDDD29: QMetaObject::activate(QObject*, int, int, void**) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.5.1)
==28354== by 0x5EEA5C7: QTimer::timerEvent(QTimerEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.5.1)
==28354== by 0x5EDEBB2: QObject::event(QEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.5.1)
==28354== by 0x51AF05B: QApplicationPrivate::notify_helper(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.5.1)
==28354== by 0x51B4515: QApplication::notify(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.5.1)
==28354== by 0x5EAF38A: QCoreApplication::notifyInternal(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.5.1)
==28354== by 0x5F045EC: QTimerInfoList::activateTimers() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.5.1)
==28354==

qdirstat-cache-writer creates broken cache file if some directory lacks Exec flag

If qdirstat-cache-writer encounters a directory which lacks the "executable" flag, it will create a broken cache file that cannot be completely read by qdirstat (only entries up to the broken line will be displayed in qdirstat).

The broken lines lack a size value, ie. there are two tab characters without a number inbetween.

Here's an example file: .qdirstat.cache.gz. It should list subdir1, subdir2 and subdir3, but since subdir2 is unreadable, subdir3 is not even listed anymore in qdirstat. Also, qdirstat has a total size of 2 MB for the entire tree, while du shows a size of 3 MB (and actually there are 4 MB of data, but the size of subdir2 cannot be detected obviously).

This is output of ls -lRa for that test directory:

br2wsl61:/tmp/test2(83)> ls -laR
.:
total 1620
drwxrwxr-x   5 og   og      4096 Feb  2 12:31 .
drwxrwxrwt. 74 root root  585728 Feb  2 12:31 ..
-rw-rw-r--   1 og   og       255 Feb  2 12:31 .qdirstat.cache.gz
drwxrwxr-x   2 og   og      4096 Feb  2 12:30 subdir1
drw-rw-r--   2 og   og      4096 Feb  2 12:28 subdir2
drwxrwxr-x   2 og   og      4096 Feb  2 12:30 subdir3
-rw-rw-r--   1 og   og   1048576 Feb  2 12:27 testfile0.bin

./subdir1:
total 1032
drwxrwxr-x 2 og og    4096 Feb  2 12:30 .
drwxrwxr-x 5 og og    4096 Feb  2 12:31 ..
-rw-rw-r-- 1 og og 1048576 Feb  2 12:30 testfile1.bin

./subdir2:
ls: cannot access ./subdir2/.: Permission denied
ls: cannot access ./subdir2/..: Permission denied
ls: cannot access ./subdir2/testfile2.bin: Permission denied
total 0
d????????? ? ? ? ?            ? .
d????????? ? ? ? ?            ? ..
-????????? ? ? ? ?            ? testfile2.bin

./subdir3:
total 1032
drwxrwxr-x 2 og og    4096 Feb  2 12:30 .
drwxrwxr-x 5 og og    4096 Feb  2 12:31 ..
-rw-rw-r-- 1 og og 1048576 Feb  2 12:30 testfile3.bin

When I ran qdirstat-cache-writer on the test directory, these Perl warnings were printed:

Use of uninitialized value $_[0] in bitwise and (&) at /usr/lib64/perl5/Fcntl.pm line 221.
Use of uninitialized value $_[0] in bitwise and (&) at /usr/lib64/perl5/Fcntl.pm line 223.
Use of uninitialized value $_[0] in bitwise and (&) at /usr/lib64/perl5/Fcntl.pm line 225.
Use of uninitialized value $_[0] in bitwise and (&) at /usr/lib64/perl5/Fcntl.pm line 226.
Use of uninitialized value $_[0] in bitwise and (&) at /usr/lib64/perl5/Fcntl.pm line 227.
Use of uninitialized value $_[0] in bitwise and (&) at /usr/lib64/perl5/Fcntl.pm line 224.
Use of uninitialized value $size in concatenation (.) or string at censored/qdirstat/scripts/qdirstat-cache-writer line 375.
Use of uninitialized value $mtime in printf at censored/qdirstat/scripts/qdirstat-cache-writer line 376.
Use of uninitialized value $blocks in numeric gt (>) at censored/qdirstat/scripts/qdirstat-cache-writer line 378.
Use of uninitialized value $links in numeric gt (>) at censored/qdirstat/scripts/qdirstat-cache-writer line 379.

This happens with the latest qdirstat version (f33cba3), and it also happened with kdirstat-cache-writer.pl and k4dirstat 2.7.8-4-ge61717f.

QDirStat Copyright Infringement: qZedStat

https://github.com/ZeltaDred/qZedStat

Mail to [email protected] on 2017-02-28:

Douglas,

In August 2016, you forked QDirStat to your own GitHub account to use it as a base for a new project you call qZedStat.

After doing some minor changes like disabling things related to QDirStat's cleanup actions, you saw fit to change my copyright notices - you replaced them with YOUR name and YOUR e-mail address.

That happened less than two hours (!) after doing some minor changes. The most urgent thing to you was to claim credit for all that code.

What makes you think you own any copyright of my code?

What major accomplishments do you see in the small changes you made that would warrant anything like that?

By being most generous and putting QDirStat under the GPL V2, I granted everybody (including you) the right to view, copy and modify that code to tailor it to your specific needs. But that does NOT mean that you own the code - merely that you are granted some rights that closed-source software denies you.

Frankly, I feel insulted by this behaviour. Your contribution to the overall software is miniscule, yet the first thing you do is to make great claims about it. And even more insulting (and completely illegal!) is to remove my copyright notice from it all.

Now, since I believe that you are a student at Dixie U and you still have a lot to learn, I will not let the great big hammer come down on you. Not immediately, that is.

What I expect from you:

  • Immediate confirmation that you received this notice.

  • You bring my copyright back in all the places in the sources where you removed it (including the toplevel README.md). Something like "parts (c) Douglas Osborn" is okay, but it must be clear that most of this is NOT your work.

  • A formal apology, both via e-mail and in the toplevel README.md of your project.

If you do that, I will call this issue settled, and that will be it. Otherwise, I will have to take legal action. And it would be a good idea not to test my patience too much.

Kind regards

Stefan Hundhammer
QDirStat Author

Krelingstr. 4 * 90408 Nürnberg * Germany

Locate files by type from the File Type Statistics window

Idea

The new File Type Statistics window presents files by type: Category (Images, Videos, Documents, ...) in the top level, individual suffixes (filename extensions) in the next level.

qdirstat-file-type-stats

It would be useful to be able to locate files with a chosen suffix from there:

  • Click on one of the suffixes in the File Type Statistics window; say, *.bak

  • Open another (non-modal) window for the search results; probably one entry per directory that contains any files with that suffix.

  • When clicking on one of those search results, open that directory branch in the main window (similar to clicking on a treemap tile) while closing all other branches

  • Select (highlight) all matching files in that directory (they will automatically be highlighted in the treemap,too)

  • The user can now start cleanup actions for those files in the main window.

Limitations / Unsolved Problems

That will work well with a handful of files; It is still unclear how to do this efficiently with things like my photo collection: It's 29,000+ JPG files scattered over 850+ directories. That's a bit much to navigate in. Would I want only my /work/photos directory to appear there? That's a bit limiting.

This is subject for further investigation and discussion.

"Open in terminal" fails

Opening a directory in a terminal doesn't work for me. There is a message "Cleanup action finished with 1 errors" in the status bar and the log shows this:

2016-01-12 00:31:52.508 [9571] <Debug>   OutputWindow.cpp:40 OutputWindow():  Creating
2016-01-12 00:31:52.508 [9571] <Debug>   Cleanup.cpp:224 chooseShell():  No custom shell configured - using /bin/bash
2016-01-12 00:31:52.509 [9571] <Debug>   OutputWindow.cpp:432 startNextProcess():  Starting x-terminal-emulator --workdir '/home/cs/devel/cool-old-term.orig/app'
2016-01-12 00:31:52.518 [9571] <Debug>   OutputWindow.cpp:197 processFinished():  Process finished normally.
2016-01-12 00:31:52.519 [9571] <Debug>   OutputWindow.cpp:229 processFinished():  Emitting lastProcessFinished() err: 1
2016-01-12 00:31:52.519 [9571] <Debug>   MainWindow.cpp:546 cleanupFinished():  Error count: 1
2016-01-12 00:31:52.519 [9571] <Debug>   OutputWindow.cpp:306 closeIfDone():  No more processes to watch. Auto-closing.
2016-01-12 00:31:52.519 [9571] <Debug>   OutputWindow.cpp:56 ~OutputWindow():  Destructor

%p does not escape single quotes properly

I have a file name:
Swedish House Mafia - Don't You Worry Child ft. John Martin.mp4

I have configured a custom cleanup action, named "Open file in default application". The command for this is:
xdg-open %p

When I click this cleanup action from the context menu on the file, I get a new window with the cleanup output:

cd /data/Google Drive/Media/Divers
xdg-open '/data/Google Drive/Media/Divers/Swedish House Mafia - Don't You Worry Child ft. John Martin.mp4'
/bin/bash: -c: line 0: unexpected EOF while looking for matching `''
/bin/bash: -c: line 1: syntax error: unexpected end of file
Process finished.

This window does not show if the cleanup action runs succesfully. The cleanup action works with files that do not contain single quotes in their filename.

I'm using MATE and this is detected by QDirStat, which falls back to the default terminal emulator xterm.

Explore QMainWindow Docks

QMainWindow offers the option to create "dock widgets". Maybe that might be a better solution to the window arrangement problems that arise when using the "File Type Statistics" and "Locate Files" windows?

Maybe that might even be an option for a more flexible arrangement of the main window's tree view vs. the treemap? (side by side vs. currently above and below)

PPA is pretty outdated

The official PPA hasn't been updated in 5 months but there have been many new updates since then. Can it get some TLC?

Thanks 👍

EDIT: Nevermind, I just noticed the updates weren't version updates. Still at 1.0 stable. Github doesn't let me delete this.

Cache file read failure

Program fails to read/load complete cache file..

Environment is Ubuntu 16.04 VM ( virtualbox ) with QT 5.7 ( opensource )
Cache file attached..
qdirstat.cache.gz

File generated by pointing at root (/) mount point while running as non-root user.
Treemap builds and displays, Cache file save seems to write "correct" information.

When attempting to read the cache file, the first (/) directory and the 2 file links are the only things processed / displayed..

Log file is full of the "cannot find parent" messages referenced in the other cache file issue reported

qdirstat-1000.log.tar.gz

build error on OS X (10.9)

I ran qmake and then make on OS X, and it seemed to be going fine until it got to Logger.cpp. Here's the output:

clang++ -c -pipe -stdlib=libc++ -mmacosx-version-min=10.7 -g -arch x86_64 -Wall -W -DQ_DECL_OVERRIDE="" -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Cellar/qt/4.8.6/mkspecs/unsupported/macx-clang-libc++ -I. -I/usr/local/Cellar/qt/4.8.6/lib/QtCore.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.6/lib/QtCore.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.6/lib/QtGui.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.6/lib/QtGui.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.6/include -I.moc -I. -F/usr/local/Cellar/qt/4.8.6/lib -o .obj/Logger.o Logger.cpp
Logger.cpp:260:2: error: use of undeclared identifier 'abort'
abort();
^
1 error generated.
make[1]: *** [.obj/Logger.o] Error 1
make: *** [sub-src-make_default-ordered] Error 2

openSUSE package for qdirstat

You can find it in https://build.opensuse.org/package/show/home:dmacvicar/qdirstat

Some notes:

  • Because lack of tarballs and tags, I used a OBS _service file to generate the tarball and update the version in the spec. So the package sources will be re-fetched from git every time the package is rebuilt.
  • You can automate that github commits trigger a _service rebuild of the sources (tarball and spec version update). It is described here.
  • The version format is 0.8+git.1452544836.ea0d400 where the first number is a timestamp and then the git hash. The 0.8 is for now hardcoded in_service` and taken from an internal constant.
  • Ideally 0.8 should be replaced with @PARENT_TAG@ in _service, then OBS would look for the parent tag (eg. 0.9) in git of the branch we are building (by default, master) and then automatically generate 0.9+git.$s.$rev.
  • As a first step I would recommend just start tagging releases with plain version numbers (eg. no v), and keep building from master. Later you can switch _service to build from stable branches if needed.
  • If you dislike the server side magic to generate the tarball and update the spec, there is an alternative method where you can update the tarball to the latest git revision manually in your checkout:
    • Add an attribute mode="disabled" to the service elements in _service.
    • Run osc service disabledrun to update the tarball and .spec file version
    • You will need in this case, to checkin the generated tarball, as it will not longer be autogenerated.
  • Feel free to osc copypac this package to somewhere else.

Segmentation fault with custom cleanup action while scanning a directory

I have configured a custom cleanup action, named "Open file in default application". The command for this is:
xdg-open %p

If I start a scan and during this scan, I execute the custom cleanup action on a file, qdirstat crashes and exits with an segmentation fault. I am able to reproduce this over and over again.

QStorageInfo for file system boundaries

Hi. I would like to ask/propose, whether would it be possible to use QStorageInfo to get the underlying device of a path, and thus know when you crossed a file system boundary. QStorageInfo was new in 5.4, so that would kill Qt4 support, unfortunately, but I don't know if that's really a goal of the project.

That's one of the things mentioned in the README (maybe the only one?) that requires non cross-platform code. I would like to know your opinion, since I'm collecting some notes on possible limitations/shortcomings of the Qt API for file systems. Maybe adding QFileInfo::device() (instead of having to construct the QStorageInfo from the path) would be also more convenient.

Use Theme Icons

The Icons that are used look pretty out of place when a different icon theme is used.

QIcon has some nice features that allow using theme icons with backup icons should they not be available.

I haven't looked too much into the source code, but it could also be possible to let Qt determine the mime type of files to use mime icons from the desktop theme.

I have already made some progress and replaced some of the simpler Icons that are used in the UI.

Some progress, icons are from the arc icon theme:

image

Compilation error for Qt4

Hi,

Nice tool.

I've encountered a compilation error on Fedora 25 for QDirStat v1.2 with qt-devel-4.8.7-18.fc23.x86_64

File Logger.cpp, Line 287 should b aware of Qt version

#if (QT_VERSION < QT_VERSION_CHECK( 5, 0, 0 ))
if ( !strstr(msg, "Could not connect to display" ) )
#else
if ( msg.contains( "Could not connect to display" ) )
#endif

And then it works fine,

KR, Olivier

Characters not accepted in folder names

Hi;

many thanks for QDirStat :-) !

as shown in attached screenshot, using special characters, as "À" for example, is not accepted :-/ .

Thanks again!

--
Luc

document

Space Sniffer like Treemap?

qdirstat's treemap doesn't provide much information unless you hover on entries.

Perhaps we could have a treemap similar to Space Sniffer which has File / Folder name & size on the tiles themselves.

Another feature of those tiles is that you can browse the structure by double-clicking on them etc.

Add command line switch for slow update for remote X

As a workaround for #27, add a command line switch like --slow-updates to QDirStat indicating that it should slow down display updates from the normal 333 millisec to something like 2 or 3 sec.

The slow update interval should be customizable in the config file with a separate parameter like SlowUpdateTimerMillisec that is used when that command line switch is specified.

"Open in File Manager" has confusing effects for a file

When using the "Open in File Manager" action on a file, it can have a somehow confusing effect. Usually no file manager is opened, but an editor, or some other application. Sometimes also nothing happens.

Maybe this could be more like an "Open with..." action with xdg-open as default or something like that.

QDirStat doesn't scan Btrfs subvolumes

If you use QDirStat to scan a Btrfs partition, any subvolumes of that partition are not scanned: Btrfs subvolumes are treated just like ordinary mount points (which, to all intents and purposes, they are). So you might wonder why the df command shows your 40 GB root filesystem as 97% full, yet QDirStat shows only about 7 GB. The rest might be hidden in subvolumes.

QDirStat stops reading at mount points - which only makes sense because normally you want to know what eats up the disk space on that one partition that is filling up, not on any others like /home that are mounted there. Unfortunately, a Btrfs subvolume is also just another mount point, and QDirStat will start reading there, too - at /var/log, at /var/spool, at /var/lib/libvirt etc.; a typical Btrfs root filesystem has about a dozen subvolumes, and all files in them are currently disregarded by QDirStat.

You can of course click on "Continue reading at mount point" individually in
QDirStat's directory tree for each one of them, but that's tedious.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.