You are not logged in.

#1 2013-09-28 21:08:14

jumpily
Member
Registered: 2013-09-13
Posts: 27

Disowned Files

Using https://wiki.archlinux.org/index.php/Pa … ny_package

I found a bunch of files in /usr/share/mime

Is it okay to delete the mime folder? What is it for?

Offline

#2 2013-09-28 21:17:07

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,130

Re: Disowned Files

No you should not delete it.

pacman -Qo /usr/share/mime

Which files did you find were disowned?


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#3 2013-09-28 21:21:27

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Disowned Files

What is MIME: http://en.wikipedia.org/wiki/MIME
Some examples what is it for: https://wiki.archlinux.org/index.php/De … plications

There's another script that you can adjust to exclude many false positives: https://wiki.archlinux.org/index.php/Lostfiles e.g. from /usr/share/mime/

Offline

#4 2013-09-28 21:38:06

jumpily
Member
Registered: 2013-09-13
Posts: 27

Re: Disowned Files

karol wrote:

What is MIME: http://en.wikipedia.org/wiki/MIME
Some examples what is it for: https://wiki.archlinux.org/index.php/De … plications

There's another script that you can adjust to exclude many false positives: https://wiki.archlinux.org/index.php/Lostfiles e.g. from /usr/share/mime/

How does MIME apply to me?

I previously moved /usr/share/mime to /usr/share/mime.back
Nothing stopped functioning.
Should I just move it back?

that script is listing important directories like /boot and /home as well as a lot of other stuff that shouldn't be deleted.

Last edited by jumpily (2013-09-28 21:49:29)

Offline

#5 2013-09-28 22:14:33

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,130

Re: Disowned Files

Yes, you should move it back. Did you actually check which packages own the directory? Unless neither the directory nor anything in it is owned by any package, moving it will create difficulties with package management at some point. Note that lots of packages create directories and folders in /usr/share/mime and may depend on them, even though they are not installed as part of the package.

Compare: no package owns /usr/share/fonts/TTF/fonts.dir but this file is created or updated by packages which install fonts into this directory. Without it, the system loses track of the fonts available on the system.

Applications which depend on mimetypes use them to identify files and to figure out which applications can deal with which files.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#6 2013-09-28 23:06:33

jumpily
Member
Registered: 2013-09-13
Posts: 27

Re: Disowned Files

cfr wrote:

Yes, you should move it back. Did you actually check which packages own the directory? Unless neither the directory nor anything in it is owned by any package, moving it will create difficulties with package management at some point. Note that lots of packages create directories and folders in /usr/share/mime and may depend on them, even though they are not installed as part of the package.

Compare: no package owns /usr/share/fonts/TTF/fonts.dir but this file is created or updated by packages which install fonts into this directory. Without it, the system loses track of the fonts available on the system.

Applications which depend on mimetypes use them to identify files and to figure out which applications can deal with which files.

Cool, thank you.

Offline

#7 2013-09-29 16:10:13

jumpily
Member
Registered: 2013-09-13
Posts: 27

Re: Disowned Files

karol wrote:

What is MIME: http://en.wikipedia.org/wiki/MIME
Some examples what is it for: https://wiki.archlinux.org/index.php/De … plications

There's another script that you can adjust to exclude many false positives: https://wiki.archlinux.org/index.php/Lostfiles e.g. from /usr/share/mime/

Whata is that script supposed to return? It's returning important directories.

Offline

#8 2013-09-29 16:16:26

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Disowned Files

I only fixed it so it works https://wiki.archlinux.org/index.php?ti … did=253652 but, as I said, it needs to be adjusted to exclude many false positives.
I have no use for neither https://wiki.archlinux.org/index.php/Pa … ny_package nor https://wiki.archlinux.org/index.php/Lostfiles but you can e.g. combine them to create one fully functional script :-)

Offline

#9 2013-10-23 11:59:26

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: Disowned Files

I'm not sure how lostfiles[1] is actually working since it's showing files that doesn't exist on my filesystem as orphaned.  Am I missing something?

Example output:

...
/usr/share/licenses/libxcomposite
/usr/share/licenses/libxcomposite/COPYING
/usr/share/licenses/libxcursor
/usr/share/licenses/libxcursor/COPYING
/usr/share/licenses/libxdamage
/usr/share/licenses/libxdamage/COPYING
/usr/share/licenses/libxdmcp
/usr/share/licenses/libxdmcp/COPYING
...

But...

ls /usr/share/licenses/lixdmcp
ls: cannot access /usr/share/licenses/lixdmcp: No such file or directory

1. https://wiki.archlinux.org/index.php/Lostfiles

Last edited by graysky (2013-10-23 11:59:53)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#10 2013-10-23 12:28:33

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,783
Website

Re: Disowned Files

graysky wrote:

I'm not sure how lostfiles[1] is actually working since it's showing files that doesn't exist on my filesystem as orphaned.  Am I missing something?

Example output:

...
/usr/share/licenses/libxcomposite
/usr/share/licenses/libxcomposite/COPYING
/usr/share/licenses/libxcursor
/usr/share/licenses/libxcursor/COPYING
/usr/share/licenses/libxdamage
/usr/share/licenses/libxdamage/COPYING
/usr/share/licenses/libxdmcp
/usr/share/licenses/libxdmcp/COPYING
...

But...

ls /usr/share/licenses/lixdmcp
ls: cannot access /usr/share/licenses/lixdmcp: No such file or directory

1. https://wiki.archlinux.org/index.php/Lostfiles

I guess you have extra/libxdmcp installed, but the license file has gone AWOL?

What the script is doing is comparing what pacman thinks is on your system, with what's actually on your system, anything listed is either:
1) not on the filesystem, but pacman thinks it should be.
Or
2) on the filesystem, but pacman doesn't know about it. (such as user files, cache files, etc)

EDIT: It also lists the directories it deliberately omits from the find command too, which is a bit confusing.

Last edited by WorMzy (2013-10-23 12:42:48)


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#11 2013-10-23 12:51:21

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: Disowned Files

I see... the script is confusing then as I would expect the output to be only files on the filesystem that are orphaned... I have no interest in seeing what a package provides that is not on the filesystem.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#12 2013-10-23 13:10:19

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,783
Website

Re: Disowned Files

Change 'comm -3' to 'comm -13', then it'll suppress files unique to the the first input (i.e. files that pacman thinks should be there, but aren't).


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#13 2013-10-23 15:10:03

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: Disowned Files

@MorMzy - Thank you.  Works as expected now.  I also updated the code on the wiki with additional paths that are in my opinion, false positives and in the case of /boot/grub highly dangerous to remove.[1]

1. https://wiki.archlinux.org/index.php?ti … did=257152


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#14 2013-10-26 15:47:22

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: Disowned Files

Tracking changes on the wiki is lame; I pulled the code off the wiki and into a github repo.  AUR package: https://aur.archlinux.org/packages/lostfiles


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

Board footer

Powered by FluxBB