Finished v1.
This commit is contained in:
parent
0961d74725
commit
61da0eb820
14
README.md
14
README.md
|
@ -2,6 +2,8 @@
|
|||
|
||||
*This is a random collection of useful things I came across.
|
||||
It's mostly distro-agnostic but sometimes specific for [pacman-based distros](https://en.wikipedia.org/wiki/List_of_Linux_distributions#Pacman-based).*
|
||||
|
||||
[[TOC]]
|
||||
|
||||
### 0. *Short example template.*
|
||||
- Description: *What is this good for.*
|
||||
|
@ -11,8 +13,8 @@ It's mostly distro-agnostic but sometimes specific for [pacman-based distros](ht
|
|||
- `# this is the actual code lol`
|
||||
- Aditionally: *Anything else that might be important like additional ressources.*
|
||||
|
||||
### 1. Automatically clear cache.
|
||||
- Description: Move files older than a specific amount of time from your user's `~/.cache` directory to the trash.
|
||||
### 1. Automatic clear cache.
|
||||
- Description: Automatically move files older than a specific amount of time from your user's `~/.cache` directory to the trash.
|
||||
- Requires: The [rmtrash](https://github.com/PhrozenByte/rmtrash) package.
|
||||
- How-to: Add the following line to your crontab using the command "crontab -e" (or EDITOR=$editor crontab -e).
|
||||
- `0 17 * * * /usr/bin/find ~/.cache/* -mtime +7 -exec /usr/bin/rmtrash -rf {} \;`
|
||||
|
@ -26,7 +28,7 @@ It's mostly distro-agnostic but sometimes specific for [pacman-based distros](ht
|
|||
- Additionally: [ArchWiki: systemd](https://wiki.archlinux.org/title/Systemd/Journal#Journal_size_limit).
|
||||
- Additionally: This can also be achieved using `journalctl` and be [limited by time](https://wiki.archlinux.org/title/Systemd/Journal#Clean_journal_files_manually).
|
||||
|
||||
### 3. Syntax highlight for nano
|
||||
### 3. Syntax highlight for nano.
|
||||
- Description: Enable syntax highlighting for nano.
|
||||
- Requires: The [nano](https://www.nano-editor.org/) editor.
|
||||
- How-to: Edit `~/.config/nano/nanorc` or to `/etc/nanorc` and add the following:
|
||||
|
@ -41,7 +43,7 @@ It's mostly distro-agnostic but sometimes specific for [pacman-based distros](ht
|
|||
- This prints the summarized size of $folder in human-readable format every second.
|
||||
- Additionally: ---
|
||||
|
||||
### 5. Use sudo !!.
|
||||
### 5. Repeat last command as su.
|
||||
- Description: Repeat the last command using sudo.
|
||||
- Requires: The [sudo](https://www.sudo.ws/) package.
|
||||
- How-to: Just type `sudo !!` and the last command will be repeated using `sudo`.
|
||||
|
@ -61,7 +63,7 @@ It's mostly distro-agnostic but sometimes specific for [pacman-based distros](ht
|
|||
- `# systemctl enable paccache.time`
|
||||
- Additionally: Edit the paccache.service in /usr/lib/systemd/system/ and change the command to e.g. keep the latest installed version and no uninstalled version of all packages: `ExecStart=/usr/bin/paccache -rk1 && /usr/bin/paccache -ruk0`
|
||||
|
||||
### 8. Passwordless SSH
|
||||
### 8. Passwordless SSH.
|
||||
- Description: Connect to a remote maschine using SSH without a password.
|
||||
- Requires: A SSH implementation like [TinySSH](https://tinyssh.org/).
|
||||
- How-to: Generate a keypair and send the public key to the remote maschine's authorized keys.
|
||||
|
@ -71,7 +73,7 @@ It's mostly distro-agnostic but sometimes specific for [pacman-based distros](ht
|
|||
- For example: `ssh-copy-id foo@192.168.178.123`
|
||||
- Additionally: Here's a more detailed [tutorial](https://www.hostinger.com/tutorials/how-to-setup-passwordless-ssh/).
|
||||
|
||||
### 9. Automatically clean orphaned packages.
|
||||
### 9. Automatic clean orphaned packages.
|
||||
- Description: Automatically remove orphaned packages.
|
||||
- Requires: A pacman-based distribution.
|
||||
- How-to: Add the following line to your crontab.
|
||||
|
|
Loading…
Reference in New Issue