This project is a C program that recursively lists the contents of a directory and its subdirectories, displaying detailed information about each file and directory.
- Recursively traverses directories starting from a specified root directory.
- Displays the following information for each file:
- Name: Full path relative to the root directory.
- Inode Number: The inode number of the file.
- Type: File type (e.g.,
file,directory,symbolic link,FIFO, orother). - Size: File size in bytes.
- Owner: User ID and username of the file owner.
- Group: Group ID and group name of the file owner.
This project is a C program that recursively lists the contents of a directory and its subdirectories, displaying detailed information about each file and directory.
-
Compile the program using a C compiler, for example:
gcc -o directory_viewer main.c
-
The output will look like:
Node: ./root Inode: 15482892 Type: directory Size: 4096 Owner: 1000 username Group: 1000 groupname Node: ./root/dir Inode: 15482893 Type: directory Size: 4096 Owner: 1000 username Group: 1000 groupname Node: ./root/dir/test Inode: 15472878 Type: file Size: 512 Owner: 1000 username Group: 1000 groupname'
This project is intended for educational purposes only and is not meant for commercial use.
- Name: [Filippo Spazzali]
- School: [Università degli Studi di Trieste]
- Course: [Computer Science]