0

If I boot into Ubuntu and then use some compilers or interpreters like gcc or python and do some internet browsing with Google chrome without saving any file to the partition I am booted from, and then simply shut down. In the above case what will be the directories that will still be written and how frequently they will be written? and what will be directories that are most frequently accessed to read from?

By 'writing some directory', I mean writing some file in that directory. By 'directory' I mean standard subdirectories of root directory.

0

/bin/, /sbin/, /usr/, /etc/ are usually used by daemons where the startup scripts, binaries and configuration files are stored. /var/ is often used for logging, /tmp/ - to store some temporary files, /proc/ to store different information about the system and running processes, /dev/ - list of hardware. And /boot/, of course, with kernel & boot loader settings.

0
  • Must always be writable:

    In principle, in normal operation only files in /home, /tmp and /var will be created / updated / deleted / renamed; also possibly files in /opt and /srv, depending on the specific services your system is running. And of course /proc, /run ,/sys and /dev, but those are in-memory filesystems.

    You may have a swap file somewhere: it will of course be modified during normal system operation.

  • Should not be modified in normal operation:

    Files in /etc should not be modified during normal operation, but it may be the case that some system service has a different idea. Files in /bin, /boot, /lib, /sbin and /usr are definitely not supposed to be modified during normal system operation. (In the old days it was considered normal to mount /usr read-only over the network, to save disk space.)

    Except... Ubuntu nowadays does unattended-upgrades and thus it may happen that any file in any directory might be changed without user intervention or knowledge.

See the Linux Filesystem Hierarchy Standard for an in-depth discussion.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.