
Unix tool tip
@UnixToolTip
Tips on Unix utilities and related topics from @JohnDCook.
You might like
'The enjoyment of one's tools is an essential ingredient of successful work.' -- Donald E. Knuth
When giving numeric arguments to the find utility, + means greater than and - means less than. e.g. +7 means greater than 7.
In Emacs, to send the contents of a region to a shell command, use M-|.
"no Shakespeare yet -- only syntactically correct Bash scripts"

Legend has it gym memberships are particularly hard to cancel here because nobody knows how to exit

Replace string in a huge (70GB), one line, text file unix.stackexchange.com/questions/4136…
Trim leading and trailing whitespace: sed -i 's/^[ \t]*//;s/[ \t]*$//' somefile
Example from my latest blog post: sample a file with replacement, choosing 12 items: shuf -n 12 -r file.txt
Boolean operators in find: -not, -or. There's no 'and' because 'and' is implicit when two requirements are listed.
Seven habits of effective text editing moolenaar.net/habits.html // general principles, examples with Vim
Can show all environment variables with printenv. Probably want to pipe to less.
Repeat a shell command, replacing all instances of a word with something new johndcook.com/blog/2022/10/2…
Trim leading whitespace: sed -i 's/^[ \t]*//' somefile
'A successful software tool is one that was used to do something undreamed of by its author.' -- Stephen Johnson
Limit find's depth of search with the -maxdepth option.
If you only want to know whether two files differ, not how they differ, use diff -q (or --brief).
United States Trends
- 1. Westbrook 9,504 posts
- 2. Gold Glove 6,032 posts
- 3. Kings 138K posts
- 4. Rickey 1,589 posts
- 5. #wednesdaymotivation 8,606 posts
- 6. Jay Jones 66.7K posts
- 7. Veo 3.1 3,062 posts
- 8. Jared Leto 7,490 posts
- 9. Young Republicans 129K posts
- 10. Big Balls 11.8K posts
- 11. Brodie 3,821 posts
- 12. Voting Rights Act 16.3K posts
- 13. Bessent 72.9K posts
- 14. Lavine N/A
- 15. Summer Walker 3,512 posts
- 16. Vision Pro 5,049 posts
- 17. Maybe in California N/A
- 18. Sabonis N/A
- 19. Noah Brown N/A
- 20. Justice Jackson 3,468 posts
You might like
-
Computer Science
@CompSciFact -
Regular Expression
@RegexTip -
Probability Fact
@ProbFact -
Algebra Etc.
@AlgebraFact -
Data Science Fact
@DataSciFact -
Scientific Python
@SciPyTip -
Analysis Fact
@AnalysisFact -
Ubuntu
@ubuntu -
The Linux Foundation
@linuxfoundation -
nixCraft 🐧
@nixcraft -
Differential Eqns
@diff_eq -
Topology Fact
@TopologyFact -
Logic & Applications
@LogicPractice -
Red Hat
@RedHat -
Docker
@Docker
Something went wrong.
Something went wrong.