https://github.com/mohit-s96/fs-utils
File system related utils with the defaults I like
https://github.com/mohit-s96/fs-utils
c cli filesystem fs linux macos
Last synced: 2 months ago
JSON representation
File system related utils with the defaults I like
- Host: GitHub
- URL: https://github.com/mohit-s96/fs-utils
- Owner: mohit-s96
- Created: 2024-11-16T14:22:20.000Z (6 months ago)
- Default Branch: master
- Last Pushed: 2025-02-07T22:39:00.000Z (3 months ago)
- Last Synced: 2025-02-07T23:25:34.563Z (3 months ago)
- Topics: c, cli, filesystem, fs, linux, macos
- Language: C
- Homepage:
- Size: 52.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### File system related CLI utils with defaults that I like
#### Commands
- _ls_: defaults to showing real directory size 1 level deep instead of the block size. default sorting by last modified time.
- _f_: multi threaded find. recursive by default. supports simple patterns like `?`, `*` (not `[]` classes).
- _cp_: multi threaded copy. mimics the unix `cp` in behavior.
- _new_: one command for creating a file or a dir (`-d`) in the pwd.
- _size_: total size of a directory. basically multi-threaded `du -sh`.Doesn't support unicode (yet).
### Installation
__Create executable__
```sh
make
```__Install with the command name `fs`__
```sh
make install
```__Run tests__
```sh
make test
```### Development checklist
- [x] Build a cli parser- [x] Add and configure a test runner
```sh
fs .
```
- [x] prints out the files, directories of the current (or any) directory. defaults
to list view. has human readable sizes and permissions and date modified. default
sorted by date modified. has the actual directory size instead of the block size.
shows hidden files by default.
```sh
fs . -s -a
```
- [x] same as above but -s sorts by size and -a sorts alphabetically```sh
fs f . --file "hello.c"
```
- [x] means find and print full paths of any file in the current directory with name
containing the string "hello.c". recursive by default. the name can also be a
pattern like "*.mp4" etc. maybe make search multi threaded??```sh
fs f . --file "hello.c" -nr
```
- [x] nr means no recursion so only search the top-level dir```sh
fs cp
```
- [x] copy from source to destination. if destination don't exist it creates one.
source can be file or directory```sh
fs new "file.txt"
```
- [x] creates a file named "file.txt" in the current directory```sh
fs new -d "my_dev"
```
- [x] creates a directory named "my_dev" in the current directory```sh
fs size .
```
- [x] gives the total space occupied on the disk by the current directory or file