OS, File and File System

Photo by Clint Patterson on Unsplash
  1. Operating System.
  2. File and File System.

Operating System

There are many operating systems nowadays. The most popular ones are Microsoft Windows, macOS, and Linux.

https://en.wikipedia.org/wiki/Operating_system

An operating system is system software that manages computer hardware, software resources, and provides common services for computer programs.

I’m sure you are familiar with Windows and macOS. However, you might not hear about Linux much. Linux is the leading operating system on the servers. Android is powered by the Linux operating system.

In simple words, we can say that the operating system manages hardware. The main components of any computer are CPU, RAM memory, and hard driver. They will not work by themselves. They need some system to manage them and Operating System is software that manages hardware. Also, we can install different programs on top of the operating system. For example, the browser, games on your pc, etc.

File and File System

In the previous article, we said we can imagine computer memory as a big canvas. Now, somehow we need to manage this one big piece of data. The way we manage is by dividing them into files and organizing all the files as a file system.

There are two types of files. The first one is a directory(folder). The directory can have other files inside. Remember we can refer to directories as files as well. The second type is an actual file. This type of format has a great number of formats(.txt, pdf, png). In fact, you even can create your own format.

Every file has a header, body, and ending point of the file. The header mainly contains metadata(data about data) about a file. Things like the file format, how to read the file, size, who created it, etc. The body will contain the actual content of the file. The ending part indicates that there is no more content of the file.

Each file has a specific path in the file system. A file path specifies a unique location in a file system.

For example, my notes.txt file on my Desktop will have this file path.

File path: C:\Users\Beknazar\Desktop\notes.txt

The File System is the way we organize files. It is based on a tree data structure. It has a root directory(C: for Windows and / for macOS)

This article is part of the series of articles to learn Java programming language from Tech Lead Academy:1. Introduction to programming 
2. OS, File, and File System
3. Working with terminal
4. Welcome to Java Programming Language
5. Variables and Primitives in Java
6. Methods with Java
7. Java Math Operators and special operators
8. Conditional branching in Java
9. Switch statement in Java
10. Ternary operator in Java
11. Enum in Java
12. String class and its methods in Java
13. Loops in Java
14. Access modifiers in Java
15. Static keyword in Java
16. The final keyword in Java
17. Class and Object in Java
18. Object Oriented Programming in Java
19. OOP: Encapsulation in Java
20. Inheritance in Java
21. Abstraction in Java
22. Polymorphism in Java
23. Overriding vs Overloading in Java
24. OOP Design Principles in Java
25. Array in Java
26. Data Structures with Java
27. Collection framework in Java
28. ArrayList in Java
29. Set in Java
30. Map in Java
31. LocalDate in Java
32. Exception in Java
33. IO in Java
34. Design Patterns
35. Generics in Java
36. Multithreading in java
37. JUnit
38. Big O Notation for coding interviews
39. Top 17 Java coding interview questions for SDET

Software Developer, Java Instructor https://www.techleadacademy.io/