My main question is about /run/user/1000:

  • Should I avoid touching it?
  • Could I delete it?
  • Is there something wrong with it?

Background: I’m fairly new to Linux and just getting used to it.

I use fsearch to quickly find files (because my filenaming convention helps me to get nearly everything in mere seconds). Yesterday I decided to let it index from root and lower instead of just my home folder.

Then I got a lot of duplicate files. For example in subfolders relating to my mp3 player I even discovered my whole NextCloud ‘drive’ is there again: /run/user/1000/doc/by-app/org.strawberrymusicplayer.strawberry/51b78f5c/N

Searching: Looking for answers I read these, but couldnt make sense of it.

Puzzled:

  • Is this folder some RAM drive so my disk doesnt show anything strange? Because this folder doesnt even show up at the root level.
  • Are these even real? Because the size of it (aprox 370 GB) is even bigger then my disksize (screenshot).

Any tips about course of (in)action appreciated.

62 points
*

Never touch anything in /run directory.

permalink
report
reply
18 points

Thanks! And I will remove it from my search index to restrain from “decluttering”. 👌👍

permalink
report
parent
reply
26 points

Don’t “declutter” manually. Use your package manager.

permalink
report
parent
reply
8 points
*

I learned a lot in these comments but in this specific context:

  • a flatpak app uses a base directory (mp3 player).
  • I set it to my NextCloud folder.
  • Now run/usr/1000 is “filled” with all my thousands of pdf from personal archive, several times per file (because multiple flatpaks).

These don’t need decluttering I learned, but aren’t managed by package managers either.

permalink
report
parent
reply
3 points

The search index isn’t managed by you package manager, is it?

permalink
report
parent
reply
58 points

I’d say a good rule of thumb for a beginner is not to touch anything outside of their own home directory. Modifying or deleting files in other locations is an easy way to break your system.

permalink
report
reply
14 points

Honestly as a power user for 10 years I very, very rarely come across a time it’s a good idea to touch anything outside the home directory.

permalink
report
parent
reply
6 points

/etc/fstab if you need to setup a new disk

permalink
report
parent
reply
1 point

Sound advice, thnx

permalink
report
parent
reply
43 points

https://serverfault.com/questions/24523/meaning-of-directories-on-unix-and-unix-like-systems

  • /bin - Binaries.
  • /boot - Files required for booting.
  • /dev - Device files.
  • /etc - Et cetera. The name is inherited from the earliest Unixes, which is when it became the spot to put config-files.
  • /home - Where home directories are kept.
  • /lib - Where code libraries are kept.
  • /media - A more modern directory, but where removable media gets mounted.
  • /mnt - Where temporary file-systems are mounted.
  • /opt - Where optional add-on software is installed. This is discrete from /usr/local/ for reasons I’ll get to later.
  • /run - Where runtime variable data is kept.
  • /sbin - Where super-binaries are stored. These usually only work with root.
  • /srv - Stands for “serve”. This directory is intended for static files that are served out. /srv/http would be for static websites, /srv/ftp for an FTP server.
  • /tmp - Where temporary files may be stored.
  • /usr - Another directory inherited from the Unixes of old, it stands for “UNIX System Resources”. It does not stand for “user” (see the Debian Wiki). This directory should be sharable between hosts, and can be NFS mounted to multiple hosts safely. It can be mounted read-only safely.
  • /var - Another directory inherited from the Unixes of old, it stands for “variable”. This is where system data that varies may be stored. Such things as spool and cache directories may be located here. If a program needs to write to the local file-system and isn’t serving that data to someone directly, it’ll go here.
permalink
report
reply
0 points

Thanks, this doesn’t say anything tho about 2 levels deep in bullet 10. But I get anything in run/user/1000 serves the same purpose.

permalink
report
parent
reply
17 points

In this case, yes anything under /run should not be considered as normal files.

permalink
report
parent
reply
11 points

The above is accurate, and can be considered accurate for any directory below or at well.

Per /run, it’s also mounted in memory, so trying to “declutter” it won’t get you anywhere and things will return on reboot.

permalink
report
parent
reply
25 points
*

/run contains all sorts of virtual stuff, it doesn’t persist over a reboot,

I would advise against deleting anything in it as those files are used by programs running as whether user has the ID of 1000 (most likely you)

it contains things such as sockets and lock files so that programs can interact with each other

permalink
report
reply
20 points
*

Then I got a lot of duplicate files. For example in subfolders relating to my mp3 player I even discovered my whole NextCloud ‘drive’ is there again: /run/user/1000/doc/by-app/org.strawberrymusicplayer.strawberry/51b78f5c/N

In Linux a file can show up several times in the filesystem without being duplicated. Symbolic links and hard links will cause this to happen, and they’re a normal part of organizing the filesystem. Just because you see a file in several places, that doesn’t mean disk space is wasted with duplicates. There may be only one physical copy of the file, appearing in multiple places. With hard links you need to be especially careful about deleting, since you’ll think you’re deleting one of several duplicates but you’ll in fact delete the only copy of the file.

permalink
report
reply

Linux

!linux@lemmy.ml

Create post

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

  • Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
  • No misinformation
  • No NSFW content
  • No hate speech, bigotry, etc

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

Community stats

  • 7.9K

    Monthly active users

  • 6.3K

    Posts

  • 175K

    Comments