In Linux to store data, you need files. These files can reside in a directory. And, these files are of two types. Those are Sequential and Indexed. In this post, I am sharing about top directories present in Linux.
- Before, you first start to learn about directory-You can think it is a ‘Folder’ in windows. In Linux, the ‘/’ (slash) is called root directory.
- Under root directory all other directories like User or System directories are usually created.
Active Directory provides a common interface for organizing and maintaining information related to resources connected to a variety of network directories.
The directories may be systems-based (like Windows OS), application-specific or network resources, like printers. Active Directory serves as a single data store for quick data access to all users and controls access for users based on the directory’s security policy.
You can say Nested Directory when you create a directory in another directory.
A file is called Regular file and Plain file, normally created in directories. Each file has some extension with (.) dot, so that you can easily recognise the type of files.
#creating files >mydir vi sample.java #when you save the data your file is ready sample.java
File structure in Linux
In the above structure, in the root directory, you can see both files,links and directories. You can create symbolic links like short links to quick use.
- Every directory by default you can see two dots(dot-dot)-‘..’, this tells the link for directory itself
- /.. tells root directory
- File name should not be more that 255 bytes in Linux systems
- Type ‘pwd’ to know present or current working directory
- Path, it denotes the where directory or file is located
- Example for absolute path name /home/mtk/.bashrc, /usr/include
- Example for relative path name /include/stdio.h
Ownership of Files
- Files have ownership. The ownership can be read, write and execute
- Major operations on file i/o are open(), read(), write(), close()
UNIX systems have no end-of-filecharacter. The end of a file is detected by a read that returns no data.