This one is my favorite because it allows for a recursive for loop in ZSH. You could use find to do the job, but you can have variables and write visually better code with this for loop.
Note that it might not work in Bash.
I would be happy to learn an even better way of doing it though!
split -l 7000 my_giant_json.json sub_files.json . It is far from being the command I use most, but recently it saved me during a data migration process. You can use it to split a file into several smaller chunks and then operate them.
It works like this: split -l (form number of lines) -b (for bytes) my_giant_json.json sub_files.json
Top comments (10)
tree --dirsfirst -phFDC -L 3
I love tree. I currently have this aliased to
ls
.This one is my favorite because it allows for a recursive for loop in ZSH. You could use
find
to do the job, but you can have variables and write visually better code with this for loop.Note that it might not work in Bash.
I would be happy to learn an even better way of doing it though!
split -l 7000 my_giant_json.json sub_files.json . It is far from being the command I use most, but recently it saved me during a data migration process. You can use it to split a file into several smaller chunks and then operate them.
It works like this: split -l (form number of lines) -b (for bytes) my_giant_json.json sub_files.json
history | grep
I'm lazy and forgetful, what can I say.
I do this a lot for arcane commands I executed once 2 years ago to fix that one thing that popped up again.
sl
👏 I didn't tell the whole truth above: I currently have
ls
aliased toclear; tree
.du -h --max-depth=1
You can even use
CTRL
+L
as a shortcut forclear
in most of the terminal emulators!I would rather CTRL+L