You are not logged in.

#1 2016-07-26 23:08:26

JohnBobSmith
Member
From: Canada
Registered: 2014-11-29
Posts: 804

Strange files in root dir, can I remove them?? [SOLVED]

Greetings,

I've got some weird files populating my root directory. I want to remove them, if it is safe to do so. I have no idea what the nature or origin of these files are. Thats why I'm asking here.

Some terminal outputs...

[jbs@dmb-gaming-laptop ~]$ cd /
[jbs@dmb-gaming-laptop /]$ ls
''$'\200'' '$'\004\002'  bin   home        mnt   run   tmp
''$'\200''@'$'\275'      boot  lib         opt   sbin  usr
''$'\200\240\371'        dev   lib64       proc  srv   var
''$'\200''@b'$'\002'     etc   lost+found  root  sys
[jbs@dmb-gaming-laptop /]$ file ''$'\200'' '$'\004\002'
 : ASCII text
[jbs@dmb-gaming-laptop /]$ cat ''$'\200'' '$'\004\002' | head -n15
2050 407617 /usr/lib/systemd/system-generators/lvm2-activation-generator
2050 678487 /etc/ld.so.cache
2050 407615 /usr/lib/liblvm2app.so.2.2
2050 406610 /usr/lib/libdevmapper.so.1.02
2050 406375 /usr/lib/systemd/system-generators/systemd-system-update-generator
2050 396472 /usr/lib/librt-2.22.so
2050 396400 /usr/lib/libpthread-2.22.so
2050 396419 /usr/lib/libc-2.22.so
2050 406376 /usr/lib/systemd/system-generators/systemd-debug-generator
2050 406378 /usr/lib/systemd/system-generators/systemd-gpt-auto-generator
2050 406377 /usr/lib/systemd/system-generators/systemd-hibernate-resume-generator
2050 406380 /usr/lib/systemd/system-generators/systemd-cryptsetup-generator
2050 406373 /usr/lib/systemd/system-generators/systemd-getty-generator
2050 404071 /usr/lib/libblkid.so.1.1.0
2050 404070 /usr/lib/libuuid.so.1.3.0
[jbs@dmb-gaming-laptop /]$ 

All of the entries contain similar data. Where could these files have come from, and can I remove them? Thanks in advance!

Last edited by JohnBobSmith (2016-07-27 13:30:04)


I am diagnosed with bipolar disorder. As it turns out, what I thought was my greatest weakness is now my greatest strength.

Everyday, I make a conscious choice to overcome my challenges and my problems. It's not easy, but its better than the alternative...

Offline

#2 2016-07-26 23:47:03

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: Strange files in root dir, can I remove them?? [SOLVED]

FWIW, my first guess would be that the second column indicates the inode number of the respective file. But other than that I have no clue.

I'd think they are safe to remove, but I'd be more worried about where they came from which won't be easy to determine. Do you run anything hacky as root for any game?

If the timestamps are recent, you'll probably have to keep an eye on / to see if they re-appear. Otherwise you'll probably never know and probably shouldn't worry much... well, beyond the fact that some rogue application with root permissions wrote garbage to your disk.


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#3 2016-07-27 09:37:52

Starfish
Member
From: Germany
Registered: 2015-10-21
Posts: 134

Re: Strange files in root dir, can I remove them?? [SOLVED]

Have you tried ls -l and lsof? So you know who created the files, when they were created, what their permissions are and what processes they are used by?


"Yesterday is history, tomorrow is a mystery, but today is a gift. That is why it is called the present." - Master Oogway

Offline

#4 2016-07-27 09:50:10

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,354

Re: Strange files in root dir, can I remove them?? [SOLVED]

It's likely some misconfigured logging etc. Best guess is that you mistyped a location into a systemd configuration file. But there's no real limit to the rabbit hole in terms of what exactly could be causing it.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#5 2016-07-27 13:22:41

JohnBobSmith
Member
From: Canada
Registered: 2014-11-29
Posts: 804

Re: Strange files in root dir, can I remove them?? [SOLVED]

@Starfish: Here is the output of ls -l with un-necessary stuff (remaining directories and files) removed:

[jbs@dmb-gaming-laptop /]$ ls -l
total 332
-rw-r--r--   1 root root 111509 Feb 12 13:24 ''$'\200'' '$'\004\002'
-rw-r--r--   1 root root 131914 Feb 12 12:29 ''$'\200''@'$'\275'
-rw-r--r--   1 root root  16509 Feb 12 13:50 ''$'\200\240\371'
-rw-r--r--   1 root root  14673 Feb 12 13:35 ''$'\200''@b'$'\002'
...

I'm not sure how to use lsof but I will figure it out when I can smile

I have no idea what could have been/was run on February 12th. I don't recall doing anything hacky with any game or my root directory. Honestly, since they are a bunch of ASCII text, I will remove the offending files. If they comes back, or end up crashing something, I will let you guys know. Otherwise I will mark as solved if removing them is harmless.

But, as you guys have mentioned, i'm much more worried about how they even got there in the first place than the seemingly harmless contents of said files. Oh well.

EDIT: And being from February 12, how did I not notice there presence sooner? Haha XD.

Last edited by JohnBobSmith (2016-07-27 13:26:12)


I am diagnosed with bipolar disorder. As it turns out, what I thought was my greatest weakness is now my greatest strength.

Everyday, I make a conscious choice to overcome my challenges and my problems. It's not easy, but its better than the alternative...

Offline

#6 2016-07-27 13:29:27

JohnBobSmith
Member
From: Canada
Registered: 2014-11-29
Posts: 804

Re: Strange files in root dir, can I remove them?? [SOLVED]

Well, I guess topic solved. Rebooted, they didnt re-generate or anything, nothing crashed the system and I find it unlikely any of the applications would need such garbage to function.

[jbs@dmb-gaming-laptop ~]$ cd / && ls
bin   dev  home  lib64       mnt  proc  run   srv  tmp  var
boot  etc  lib   lost+found  opt  root  sbin  sys  usr
[jbs@dmb-gaming-laptop /]$ 

Thanks guys!


I am diagnosed with bipolar disorder. As it turns out, what I thought was my greatest weakness is now my greatest strength.

Everyday, I make a conscious choice to overcome my challenges and my problems. It's not easy, but its better than the alternative...

Offline

#7 2016-07-27 17:15:42

beroal
Member
From: Ukraine
Registered: 2009-06-07
Posts: 325
Website

Re: Strange files in root dir, can I remove them?? [SOLVED]

I doubt that any program would create files with unreadable names. I am betting on 0) a bug in the file system driver or 1) hardware crash or improper power-off. If you publish the type of the file system of the root directory, it may be useful for statistics.


we are not condemned to write ugly code

Offline

#8 2016-07-27 17:24:40

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,739

Re: Strange files in root dir, can I remove them?? [SOLVED]

I am betting that you tried to cat a binary file.  I've seen bash do some strange things whilst trying that.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#9 2016-07-27 20:43:05

JohnBobSmith
Member
From: Canada
Registered: 2014-11-29
Posts: 804

Re: Strange files in root dir, can I remove them?? [SOLVED]

Ewaller, that is entirely possible given the fact that I spend a great deal of time on the command line for some of my hobby coding stuff. I was also was experience power outages in that time of year due to winter. All in all, as long as they dont come back I am good to go. smile

EDIT: File system is ext4:

[jbs@dmb-gaming-laptop ~]$ sudo parted /dev/sda2 print
Model: Unknown (unknown)
Disk /dev/sda2: 21.5GB
Sector size (logical/physical): 512B/4096B
Partition Table: loop
Disk Flags: 

Number  Start  End     Size    File system  Flags
 1      0.00B  21.5GB  21.5GB  ext4

[jbs@dmb-gaming-laptop ~]$ 

sda1 is /boot formatted to fat32. sda3 is swap. sda4 is /home and ext4.

Last edited by JohnBobSmith (2016-07-27 20:46:17)


I am diagnosed with bipolar disorder. As it turns out, what I thought was my greatest weakness is now my greatest strength.

Everyday, I make a conscious choice to overcome my challenges and my problems. It's not easy, but its better than the alternative...

Offline

Board footer

Powered by FluxBB