Last active
August 22, 2022 20:30
-
-
Save olliefr/756cf30e708186fa0701036d5f06e0d6 to your computer and use it in GitHub Desktop.
Awesome command line one-liners
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generate a random password | |
openssl rand -base64 18 | |
# Display total size of a single directory in human-readable format | |
du -csh /home/oliver/ | |
# Display size of everything in a directory in human-readable format | |
du -csh /home/oliver/* | |
# Compare the output of two programs without having to save it into files first. | |
# Use subshells to execute the command pipelines individually, by enclosing the pipeline within parenthesis. | |
# Then prefix these with < to create anonymous named pipes which can be pass to diff. | |
diff <(snap find "python2") <(snap find "media player") | |
# Find my IP address | |
curl -s api.ipify.org |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Collect all relevant PIDs and join with a
,