tags:

views:

74

answers:

4

My Mac saves my Vim's temporary files, my Scanner's log files and mach_kernel -files to my Root. I did not set this procedure up.

I am at the moment removing files at my root, since many of them seem to be just swap files. I have the idea that only folders and system's symlinks should be at root.

Which files should only be at Root?

+1  A: 

As in the files shown when you run

ls /

?

If so, I agree, only folders and symlinks. I don't like files being there.

Rich Bradshaw
+3  A: 

File System Hierarchy Standard might be useful.

It states in the section about the root file system that:

The contents of the root filesystem must be adequate to boot, restore, recover, and/or repair the system.

Sinan Ünür
@Sinan: Thank you for pointing that out! I did not not know about that explicitly.
Masi
+2  A: 

You can have anything you want there, but it's a matter of following the FHS standard you should be worried about. (as stated by Sinan)

Ólafur Waage
+1  A: 

Mac OS X doesn't quite follow the FHS Standard -- in particular, it keeps its kernel (2 versions, I'm not sure why) and kernel symbol file in / rather than in /boot, so this is normal (for OS X).

There are some other differences from the standard layout: OS X keeps user home directories in /Users instead of /home, mount points in /Volumes (or /Network in some cases) instead of /mnt, and keeps etc, tmp, and var under /private rather than / (with symlinks under /, so they can be referenced by the usual paths). It also keeps some (invisible) filesystem support files/directories up there -- things like the Spotlight, FSEvents, and hot file databases, etc.

The only reason I can think of for vim to store temp files in / is if you were editing files in / -- I take it this isn't the case?

As for the Scanner... what exactly is it, and how is it getting launched? It may just be launched with its current working directory set to /, and logging there 'cause it doesn't know any better. If you can figure out how to control it I'd recommend getting it to log into either /var/log (the unix-traditional location), /Library/Logs (which Apple likes to put their log files in), or /Users/yourname/Library/Logs (if it's user-specific, rather than a system-wide sort of thing).

Gordon Davisson
@Gordon: Thank you for your answer! It really cleared my confusion in Mac.
Masi