useful:linux-commands
                Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| useful:linux-commands [2022/08/25 15:46] – admin | useful:linux-commands [2025/09/23 07:58] (current) – admin | ||
|---|---|---|---|
| Line 2: | Line 2: | ||
| ====== Linux Commands ====== | ====== Linux Commands ====== | ||
| + | |||
| + | ===== Removing comments from config files ===== | ||
| + | |||
| + | from 20-lmtp.conf as an example: | ||
| + | |||
| + | grep ' | ||
| + | |||
| + | ===== Installing a GPG key ===== | ||
| + | |||
| + | Example: | ||
| + | |||
| + | wget -O- https:// | ||
| + | |||
| + | Then need to edit the sources.list file to look something like: | ||
| + | |||
| + | deb [signed-by=/ | ||
| ===== Change permissions for whole directory structure ===== | ===== Change permissions for whole directory structure ===== | ||
| Line 17: | Line 33: | ||
| ===== Delete all files with given pattern ===== | ===== Delete all files with given pattern ===== | ||
| - | Adapt as required | + | find . -name ' | 
| + | |||
| + | Adapt as required. | ||
| + | |||
| + | ===== Make a change in every file in a directory | ||
| + | |||
| + | sed -i ' | ||
| + | |||
| + | To make the change through a whole directory tree: | ||
| + | |||
| + | find ~/ | ||
| + | |||
| + | ===== Search within specific file type ===== | ||
| + | |||
| + | grep -ir removed --include=" | ||
| + | |||
| + | will search files with extension .txt ignoring case (-i) | ||
| + | |||
| + | ===== Bluetooth ===== | ||
| + | |||
| + | Using this from the command line seems to do more than the GUI: | ||
| + | |||
| + |  | ||
| + | |||
| + | ===== Limiting journal log size ===== | ||
| + | |||
| + | Edit the file: | ||
| + | |||
| + | / | ||
| + | |||
| + | and set SystemMaxUse, | ||
| + | |||
| + |  | ||
| + | |||
| + | Then restart journal with: | ||
| - | ind . -name ' | + | systemctl restart systemd-journald | 
| + | |||
useful/linux-commands.1661442367.txt.gz · Last modified: 2022/08/25 15:46 by admin
                
                