https://github.com/mkorangestripe/linux
Little Linux Library
https://github.com/mkorangestripe/linux
ansible bash docker git linux networking python vagrant
Last synced: 3 months ago
JSON representation
Little Linux Library
- Host: GitHub
- URL: https://github.com/mkorangestripe/linux
- Owner: mkorangestripe
- Created: 2019-11-25T23:17:03.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2025-02-03T15:45:02.000Z (over 1 year ago)
- Last Synced: 2025-02-03T16:34:47.974Z (over 1 year ago)
- Topics: ansible, bash, docker, git, linux, networking, python, vagrant
- Language: Shell
- Homepage:
- Size: 8.07 MB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Little Linux Library

### Linux Notes and Examples
Browse topics in [linux-notes](linux-notes) or clone this repo and use 'git grep' to quickly find examples in multiple contexts.
```shell script
cd linux/linux-notes
git grep awk # show examples of the awk command
git grep -w df # show examples of the df command
```
Useful options:
* -B1 : include the previous line, some examples have an explanation above
* -i : ignore case (include **n**etwork and **N**etwork)
* -n : include line number
* -w : exclude matches that are part of a word (include **df**, exclude min**df**ul)
The -m option shown here is only used to limit results.

### tldr pages
For more Linux command examples, check out [tldr](https://github.com/tldr-pages/tldr), a collection of simplified man pages.
```shell script
tldr awk # show examples of the awk command
```
### Other new commands worth checking out
```shell script
lsd # ls deluxe, more colors and icons, similar to eza
bat # cat with syntax highlighting and Git integration
fastfetch # system information, displayed pretty, similar to neofetch
htop # interactive process viewer
```
### Other Topics
The linux-notes directory also has notes and examples on the following:
* [Ansible](linux-notes/ansible.md)
* [Docker](linux-notes/docker.md)
* [Git](linux-notes/git.md)
* [Python versions, virtual envs, & packages](linux-notes/python-management.md)
* [Vagrant](linux-notes/vagrant.md)
### Favorites
This will find whether the content of any files in a directory have been modified. This is done here by computing an md5 checksum for each file in the directory and it's subdirectories. The filenames are filtered out with awk and the checksums are sorted and a combined checksum is generated. This way, whether the files are moved or renamed, the combined checksum will be the same. This method is more thorough then relying on mtime which can be adjusted or changes in file size which do not necessarily reflect changes in file content.
```shell script
find src/ -type f -exec md5sum {} + | awk '{print $1}' | sort | md5sum
```

Here's the example above broken down. This shows that newfile.txt has changed. To see all modified files, redirect the second find command to a separate text file and then run diff on the two.

For more like this, see [favorites](linux-notes/favorites.md)
### Package Updates
To schedule package updates on a laptop or desktop, see [package-updates](package-updates)