dundee / gdu

Fast disk usage analyzer with console interface written in Go
MIT License
4k stars 144 forks source link

Windows version includes files synced from OneDrive/Sharepoint in space calculations #265

Open theonetruetom opened 1 year ago

theonetruetom commented 1 year ago

I use this to do disk space analysis on client workstations without disturbing their work (our remote access tool has a PowerShell that runs as SYSTEM, so I can do this without having to remote in physically to each machine), but lately it seems like gdu is including space consumed by files that exist in SharePoint or OneDrive, which throws off my investigation considerably.

Is there any way to make the app ignore files that don't exist locally and are only cloud synced?

btrfs-d commented 3 months ago

I have this same exact issue. @dundee Please advise. This is the best utility I've found for remote storage investigations but the SharePoint/OneDrive issue is incredibly problematic.

dundee commented 3 months ago

I am not sure if I we are able to detect whether the file is local or "virtual" and placed in cloud.

Can you use -i or -I options to ignore the paths?

btrfs-d commented 2 months ago

That's problematic because the intent is to see how much local space is being occupied by locally downloaded SharePoint/OneDrive files.

Consider the following scenario (incredibly common with my client environments, and I imagine many others):

theonetruetom commented 2 months ago

The more extreme examples of this are where a 2TB SharePoint is synced with the machine with the same 512GB disk, and it becomes very confusing to do space usage analysis.

dundee commented 2 months ago

I will try to check if there are some possibilities to detect this.

theonetruetom commented 1 month ago

It looks like there are Windows filesystem attributes, specifically "RecallOnAccess" and "Unpinned" that, if set, appears to indicate that files are not stored locally. I don't know how hard it would be to programmatically check for this, but it's a thought.

EntropicNinja commented 1 month ago

I'd like to second (3rd) this feature request.