익명 07:47

Is there a way to set different trash settings for each partition in Kubuntu?

Is there a way to set different trash settings for each partition in Kubuntu?

I have a desktop with several drives, let's just refer to /home, Documents, and Pictures for this. I would like each partition to have different settings, such as:

  • /home: 6% maximum size, delete after 30 days
  • Documents: 10% maximum size, delete after 180 days
  • Pictures: 20% maximum size, delete after 90 days

Is it possible to do this in Kubuntu 26.04?



Top Answer/Comment:

You can configure different trash configuration for different partitions by editing the file ~/.config/ktrashrc. You need to use the correct path to the mount-points of your partitions. The trash directory is always in the root directory of the partition and is named .Trash-$UID. Find you UID with echo $UID.

Example:

[/home/mook/.local/share/Trash]
Days=7
LimitReachedAction=0
Percent=10
UseSizeLimit=true
UseTimeLimit=false

[/media/data/.Trash-1000]
Days=7
LimitReachedAction=0
Percent=10
UseSizeLimit=true
UseTimeLimit=false

It's pretty obvious which line you have to change when you want a different percentage. You need to set UseTimeLimit to true for your desired configuration.

상단 광고의 [X] 버튼을 누르면 내용이 보입니다