SysOps CLI is a robust, terminal-based file system analysis and operations tool designed to demonstrate advanced Functional-Object Oriented programming paradigms in Java. It leverages a suite of custom-built data structures to provide efficient file management, real-time analytics, and job scheduling.
- Heterogeneous File Management: Seamlessly handles both files and directories within a unified
GenericListstructure, demonstrating polymorphic data storage. - Smart Navigation: Implements a
Stack-based navigation history, allowing users to traverse directory depths with a reliable "Back" functionality. - Real-time Analytics: Utilizes a
PriorityQueuewith a custom comparator to instantly identify and rank the largest files in any directory. - Job Scheduling: Features a
Queue-based task processing system for simulating background file operations. - Command History: Tracks user interactions using a
Dequeto provide a history of executed commands. - Functional Design: Heavily utilizes Java Streams, lambdas, and functional interfaces for filtering, mapping, and reducing data.
The project is built upon a foundation of custom container implementations:
GenericList<T>: A flexible, array-based list supporting functional stream operations.Stack<T>: LIFO structure for navigation context.Queue<T>: FIFO structure for task scheduling.Deque<T>: Double-ended queue for history management.PriorityQueueCustom<T>: Heap-based priority queue for ranking.
- Java Development Kit (JDK) 8 or higher.
- Make (optional, for using the Makefile).
Using Make:
make runUsing Bash Script:
./run.shManual Compilation:
javac -d bin src/main/java/com/containers/*.java src/main/java/com/sysops/*.java
java -cp bin com.sysops.SysOpsApp| Command | Description |
|---|---|
ls / list |
List contents of the current directory. |
cd <dir> |
Navigate into a subdirectory (Nested navigation supported). |
back |
Return to the parent directory. |
top |
Show the largest file in the current view. |
find <name> |
Search for files/folders by name. |
size_gt <bytes> |
List files larger than the specified size. |
size_lt <bytes> |
List files smaller than the specified size. |
sort <name|size> |
Sort the current view by name or size. |
analyse <path> |
Show detailed statistics (Counts, Avg Size, Max Size) for current or target directory. |
history |
Show the last 10 commands. |
exit |
Exit the application. |
This project is part of the PoPL 2025 Coursework.