Skip to content

Commit

Permalink
chore: init commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubuntu committed Jun 16, 2024
0 parents commit 3d1a8e0
Show file tree
Hide file tree
Showing 49 changed files with 18,445 additions and 0 deletions.
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# 2024 Spring Linux System Programming

## Getting started
- Linux
Ubuntu 20.04 LTS
- openssl
You need to install openssl library

sudo apt-get install libssl-dev

- git clone https://github.com/JjungminLee/LSP-kathy.git


## P1 : SSU-Backup

A program that manages user-desired file backups in a backup folder, handled through a global linked list and metadata, allowing for flexible deletion, restoration, and listing of files.

### Usage

When the program is run, a backup folder and a metadata file named "Kathy.meta.txt" are created. This metadata file stores the state of the original files alongside their corresponding backup files, formatted as “OriginalFilePath@BackupFilePath”. When deleting the backup folder, the metadata file must also be deleted to accurately reflect the state in the global linked list. The global backup linked list holds nodes that contain both the original and backup paths.



## p2 : SSU-Repo

A program where users can add file paths to a staging list, which then tracks whether the files are new, removed, or modified. This enables free generation of commit, status, and log outputs. The program also backs up files during a revert operation. If a file path is removed from the staging list, it will no longer be tracked. The program manages committed files through a linked list.

## p3 : SSU-Sync
When a user enters a specific path, the program uses a daemon process to monitor it for modifications and deletions. If a modification occurs, a backup file is created, but no backup file is made in the case of deletion. Backup logs are viewable in a tree format. Removing the daemon process's PID not only stops the daemon but also deletes all associated backup files.
18 changes: 18 additions & 0 deletions p1/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
CC = gcc

HEADER = ssu_header
BACKUP = ssu_backup
HELP = ssu_help

$(BACKUP) : $(BACKUP).o $(HELP).o
$(CC) -o $(BACKUP) $(BACKUP).o $(HELP).o -lcrypto

$(BACKUP).o : $(HEADER).h $(BACKUP).c
$(CC) -c -o $@ $(BACKUP).c -lcrypto

$(HELP).o : $(HELP).c
$(CC) -c -o $@ $(HELP).c -lcrypto

clean :
rm -rf $(BACKUP)
rm -rf *.o
Empty file added p1/a.txt
Empty file.
Empty file added p1/b.txt
Empty file.
Binary file added p1/ssu_backup
Binary file not shown.
Loading

0 comments on commit 3d1a8e0

Please sign in to comment.