Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/junjizhi/ext2_ls
An implemenation of ls command on ext2 file system
https://github.com/junjizhi/ext2_ls
Last synced: 12 days ago
JSON representation
An implemenation of ls command on ext2 file system
- Host: GitHub
- URL: https://github.com/junjizhi/ext2_ls
- Owner: junjizhi
- Created: 2015-04-13T20:08:40.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-04-13T20:29:28.000Z (over 9 years ago)
- Last Synced: 2024-07-11T12:22:24.021Z (4 months ago)
- Language: C
- Size: 145 KB
- Stars: 3
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
Introduction
------------
A simplified version of ls implementation on ext2 file system.Assumptions
------------
There are assumptions about the size of disk image. Please refer to: http://www.cdf.toronto.edu/~csc369h/winter/assignments/a3/a3.html
For convenience, there is an generated disk image in img/ folder.Usage
------------
ext2_lsExample:
$ ./ext2_ls img/onedirectory.img /level1
drwxr-xr-x@ 2 root root 1024 1427146420 .
drwxr-xr-x@ 4 root root 1024 1427145880 ..
-rw-r--r--@ 1 root root 0 1427146419 new
-rw-r--r--@ 1 root root 128 1426429007 bfileNotes
------------
0. The program only works in 64bit machine. It assumes the int type is 32bit.
1. The print out of *ext2_ls* is not as nicely formatted as an usual
*ls* does. It needs work on *print_file* function.
2. *ext2_ls* does not support the doubly or triply i_block links.
3. There might be memory leak problems in the program. Probably due to
missing free() on the malloc'd pointers.
4. ext2_mkdir only takes for absolute path as the parameters.
5. Passing the root path "/" does not work well, but passing the second level path, e.g., "/level1" is fine.
6. The ls output is not formatted as the standard ls command. There are small alignment differences.
7. ext2_mkdir does NOT work for now. Running ext2_mkdir WILL RUIN THE DISK IMAGE. Test it with cautions!Credits
------------
1. The implementation is mostly developed from an Operating System
Course assignment: http://www.cdf.toronto.edu/~csc369h/winter/assignments/a3/a3.html.
The instructor Karen Raid designed the assignment and wrote a
detailed helpful specificiation for this program.
2. list.h is copied from Kulesh Shanmugasundaram's site: http://isis.poly.edu/kulesh/stuff/src/klist/ Kulesh deserves all the credits for posting the explanation and the adapted source code.