|
1 | | -## .zipping |
| 1 | +# 💻 Linux System Profile & Maintenance Scripts |
2 | 2 |
|
3 | | -For zip a folder or a file you can use the alias functions for zipping. If not done you have to import the aliases from the .zipping file to your .profile. |
| 3 | +This repository contains a collection of Bash configuration files, aliases, and maintenance scripts to standardize and |
| 4 | +manage your Linux environments (e.g., Ubuntu, Debian, Raspbian, Manjaro, Arch, WSL, Cygwin). |
4 | 5 |
|
| 6 | +--- |
5 | 7 |
|
6 | | -Here an example how to zip and unzip with encryption: |
| 8 | +## 📦 Contents |
7 | 9 |
|
8 | | -Lets say you have a folder '/home/johndoe/docs' and you want to zip and encrypt it. Change from the shell to the home folder of the user johndoe '/home/johndoe' and execute the following command: |
| 10 | +| File / Script | Description | |
| 11 | +|--------------------------|-------------------------------------------------| |
| 12 | +| `.aliasesrc` | Collection of useful shell aliases | |
| 13 | +| `.shell-aliases` | Erweiterte Aliase für gängige CLI-Kommandos | |
| 14 | +| `.profile` | General profile loaded by your shell | |
| 15 | +| `.aptrc` | Aliases and functions for Debian/Ubuntu (apt) | |
| 16 | +| `.mvnrc`, `.npmrc`, etc. | Tool-specific configurations | |
| 17 | +| `gen-profile.sh` | Builds the main profile from modular components | |
| 18 | +| `gen-cygwin-profile.sh` | Profile generation script tailored for Cygwin | |
| 19 | +| `.tweak.sh` | Optional shell tweaks for cleaning the system | |
| 20 | +| `.zipping` | Script for packaging the environment | |
| 21 | +| `LICENSE.txt` | License information | |
| 22 | +| `README.md` | This documentation | |
9 | 23 |
|
10 | | -```shell |
11 | | -:~$ zipAndEncrypt docs/ docs.enc |
| 24 | +--- |
| 25 | + |
| 26 | +## ⚙️ Usage |
| 27 | + |
| 28 | +### 🛠️ 1. Generate the Profile |
| 29 | + |
| 30 | +Use the script to automatically generate a `.profile` (for Bash) or `.zshrc` (for Zsh): |
| 31 | + |
| 32 | +```bash |
| 33 | +bash gen-profile.sh |
| 34 | +``` |
| 35 | + |
| 36 | +For Cygwin users: |
| 37 | + |
| 38 | +```bash |
| 39 | +bash gen-cygwin-profile.sh |
| 40 | +``` |
| 41 | + |
| 42 | +### 🧹 2. Use the System Cleanup Functions |
| 43 | + |
| 44 | +The following maintenance functions are available in your profile: |
| 45 | + |
| 46 | +```bash |
| 47 | +cleanup # Runs an OS-specific cleanup (apt, pacman, etc.) |
| 48 | +cleanupThumbnails # Clears the thumbnail cache (~/.cache/thumbnails/*) |
12 | 49 | ``` |
13 | 50 |
|
14 | | -You will be prompted twice to enter a password for the encryption. If everything goes right the output will be the zip-file 'docs.enc'. |
| 51 | +> ✅ These functions automatically detect your operating system (Ubuntu, Debian, Manjaro, Arch, etc.) |
| 52 | +
|
| 53 | +### 🔄 3. Reload Your Shell Config |
15 | 54 |
|
16 | | -If you want later to decrypt the zip-file 'docs.enc' change to the folder where the zip-file is and execute the following command: |
| 55 | +After generating the new `.bashrc` or `.zshrc`, activate the changes: |
17 | 56 |
|
18 | | -```shell |
19 | | -:~$ unzipAndDencrypt docs.enc |
| 57 | +```bash |
| 58 | +source ~/.bashrc |
| 59 | +# or |
| 60 | +source ~/.zshrc |
20 | 61 | ``` |
21 | | -You will be prompted to enter the password for the decryption of the zip-file. |
22 | | -If the password is correct the zip-file 'docs.enc' will be unzip in the current folder. |
| 62 | + |
| 63 | +--- |
| 64 | + |
| 65 | +## 📌 Recommendations |
| 66 | + |
| 67 | +- Automate the setup with an `install.sh` script |
| 68 | +- Use `cron` or a `systemd` timer to run cleanup tasks regularly |
| 69 | +- Version control your dotfiles with Git |
| 70 | + |
| 71 | +--- |
| 72 | + |
| 73 | +## 📄 License |
| 74 | + |
| 75 | +See [`LICENSE.txt`](./LICENSE.txt) |
| 76 | + |
| 77 | +--- |
| 78 | + |
| 79 | +## 🔐 .zipping |
| 80 | + |
| 81 | +To zip a folder or file, you can use the alias functions provided in the `.zipping` script. If not already sourced, make |
| 82 | +sure to import these aliases into your `.profile`. |
| 83 | + |
| 84 | +### 🔒 Example: Zip and Encrypt |
| 85 | + |
| 86 | +Suppose you have a folder `/home/johndoe/docs` that you want to zip and encrypt. First, change to the user's home |
| 87 | +directory: |
| 88 | + |
| 89 | +```bash |
| 90 | +cd /home/johndoe |
| 91 | +zipAndEncrypt docs/ docs.enc |
| 92 | +``` |
| 93 | + |
| 94 | +You will be prompted twice to enter a password for encryption. If successful, the output will be the encrypted zip file |
| 95 | +`docs.enc`. |
| 96 | + |
| 97 | +### 🔓 Example: Unzip and Decrypt |
| 98 | + |
| 99 | +To decrypt and unzip the file later, go to the folder where `docs.enc` is located and run: |
| 100 | + |
| 101 | +```bash |
| 102 | +unzipAndDencrypt docs.enc |
| 103 | +``` |
| 104 | + |
| 105 | +You will be asked for the decryption password. If correct, the archive will be extracted in the current directory. |
0 commit comments