This is probably the first video on terminal tips where all (except rsync) were new to me. Thanks for a great video of really helpful tools I didn't know about before.
It is not often that I subscribe to a channel after watching only one of its videos, but this video is significant! The content is clearly and well presented, to the point, and timely! I have subscribed. Thank you for this information. I will use these tools frequently. If I may, I'd like to ask a neurodiverse question. The advantages of using the terminal and command line's capabilities are clear. I have wanted to use the command line more often than I do. I am not fearful of using its application Terminal because I always read up on unknowns before implementing anything. I have a lot to learn. Luckily, I am technically minded and confident. So, fear of using Terminal is not a barrier for me, which is more common for others avoiding it. My reason for the slow adoption of the command line is a little different. I tend to remember and recall information visually. Whilst using Terminal, I make sure that I fully understand what I am doing. However, when I try to recall what I did at a later date, I struggle to remember it. So, my question is, do you know of software with a GUI that can record actions like changes, installations, deletions and other significant changes made in Terminal? I know asking for a GUI is somewhat contradictory when the command line and Terminal are concerned, but I see this as a way of ditching the majority of GUIs for just one. One visual app to see what I am doing would allow me to better learn and use the command line by remembering tasks by visualizing them in a timeline. Moreover, such a feature would allow me to undo or fix any mistakes when the repair is possible. Thank you for this information. I will be installing these immediately because they will save me both time and money. Cheers! ✊🧑🚒
Thanks for your kind words. I'm not aware of anything that can visualise command history as a GUI. Depending on the OS of your machine, you'll have some kind of command history file, for me it's `.zsh_history` in my home directory. You can configure this history to have timestamps so you could, in theory, power some kind of timeline. I can trawl the history to see what commands I execute, searching for things like `apt install` or `brew install` to see what software I've added and removed. It's an interesting idea to create some visualisation from that but sadly nothing seems to exist at the moment.
@@tech_craft Hey dude, sorry for my later reply to yours, and thanks for taking the time. A visualisation would work best, an example would be a graphical list with three elements, including; date and time, action (install, uninstall, other changes), and a representative icon. However, I didn't know of the history file you mentioned. I use Mac's, so I will check it out, thanks. Cheers mate. Rich.
As well as shell history, there’s “script” and “asciinema” which is closer to screen recording for a terminal. Not really what you’re looking for but it does capture output in addition to input.
You should definately install rsync from brew, the default MacOS installed rsync was last updated in 2006. With the brewed version you'll get a version that supports alternative (faster) checksum generation and compression algorithms (if rsyncing to another machine this is assuming the other machine has an up-to-date rsync as well, if not it will automatically fall back to the older protocol and inefficient algorithms).
@@rautamiekka I meant checksum generation, and I would hardly call md5/md4, as used in the macOS rsync, "the best one" and xxh is better (subjective) and faster (objective).
Does the brew version include APFS extended attributes? (I have vague recollections of some Apple versions of standard tools being tweaked for resource forks…)
This is an _extremely_ useful series on how to use Mac as an actual computer - the best way to get *ix experience on reliable hardware. You got yourself a subscriber.
Really useful bunch of tips. There are a couple here, rclone and ntfy that will be extremely useful to me. First time I've seen this channel pop up in my feed, and already subscribed on the strength of this video.
It's common to use A && B to run B when A is true, and A || C to run C when A is false. However, combining them into A && B || C is not the same as if A then B else C. In this case, if A is true but B is false, C will run.
this was very cool. thanks to your video, I've installed ncdu (Ubuntu terminal equivalent to windirstat I reckon), the exquisite/hack scene style btop and, especially, ntfy. Really useful tips. Thank you.
a great selection! Certainly I will try ntfy -- getting notifications on a smartphone sounds cool (a modern replacement for sending notification emails from cli)
I've not seen a general purpose utility for that. There's quite a few AI/ML systems for near duplicate matching but nothing wrapped up in a utility yet that I can see.
Thanks! I have a video that covers some of the setup here: ua-cam.com/video/8LcTA5m6_ts/v-deo.html This covers everything apart from the configuration of the Kitty terminal editor on the Mac. Mostly, I've just used the Dracula colour theme for Kitty so it's not too hard to reproduce. I will be doing a full video on this topic though.
HammerSpoon is good for notifications too. I hadn’t heard of Pushbullet. I use AppleScript and Messages app for remote notifications on MacOS but haven’t sorted out other systems yet.
Excellent video again. Very useful tips and great I can use these on my Mac as well as on my many Pis. After a while I was hearing another word instead of rsync. I'm often accused of rsync around with my computer. 😉
Hello 👋🏿 Awesome video. I’ve been creative with rmlint and deleted som duplicates from very important files. Does rmlint have a recovery mode on deleted files?
For me, rclone and ntfy look to be great additions for cloud tooling. I'm now sad to think that I'm coding for cloud uploads and task notifications on a task workflow management system which is the airflow on my pi cluster. And man this video is 2 years old. I'm kinda ashamed. I need some catch up to do. Subbed, sir.
So, great content once again!! I just wanted to ask, I've been crazy looking for a tool to create a sync for files and working offline in my iPad (in order to use Obsidian, but I guess for emacs would happen the same). I wouldn't like to carry with me a Raspberry Pi every time I know that I'll be working offline, and I find Working Copy useless, except whenever I start hosting a gitea repository at home (the goal is to handle me my files while using end-to-end encryption and avoiding hosting my files in the cloud)
This is a tough point at the moment. I want the answer to be Syncthing which everywhere but iOS is incredible. Sadly, there's no native iOS support. There is an app for iOS called MobiusSync, but it's pretty lacking in features and hasn't been updated in a while. I've been playing with hosting NextCloud at home and using that to expose files to my iPad. To connect back home I'm currently running Tailscale and Remote.it - testing both to see which is best. This is actually an area I've been working on a lot and I have a series of videos coming up soon showing how I'm replacing iCloud/Dropbox etc. with open source, self-hosted software.
ZSH allows you to use special mapping of environment variables. You can simply do: # append path+=('/home/geowar/extra/bin') # or prepend path=('/home/geowar/extra/bin' $path) And skip the conditional lines.
The purpose of the conditional is to check that python3 is available. How does using `path` avoid that? From my testing it will still complain if `python3` isn't installed? Maybe I'm missing something obvious!
Thank you. Very clear and well structured. (I am new to your channel) This video is in your UA-cam playlist. How do get command line on an iPad? Do you have a video with instructions? I am keen to buy and set up an iPad for software development. (I have not watched any of your Pi videos)
Thanks for the kind words! The Pi videos are the best place to start, probably this one as the best intro: ua-cam.com/video/A3qn1nqw-Gw/v-deo.html. I haven't done a video yet on what the command line looks like on the iPad _without_ the Pi. In essence the best two choices are A-Shell and iSH. I have a video about them on my content backlog.
I didn't know rlint, but rdfind works for me. I had a ton of duplicated data and chose to keep them in both places, just with rdfind -makehardlinks true. Keep in mind that this requires support for hardlinks on the filesystem (meaning most stuff except FAT, NTFS and exFAT) and that it won't work across filesystems.
do you happen to know how rmlint verifies that files are duplicates? what if there are similar files with the same filename and file size? i am thinking a checksum of large files would take too long. i didn’t immediately see this explained in their manual but i also haven’t had the time to delve into it either.
It does run a hash to figure out if files are the same. You control the type of hash using the paranoia setting 😂 rmlint.readthedocs.io/en/latest/tutorial.html#paranoia-mode
That's good question, and it's a rich area of choices. If you're using Homebrew on the Mac then you can run `brew dump` to get a bundle file that lists all your installed software. That same file can be replayed using `brew bundle` to install all the software on a new machine or when reinstalling. For something more sophisticated you have tools like Ansible or Nix. Both are comprehensive solutions but have a pretty steep learning curve!
This is a feature of htop but btop must have it: By selecting a process and pressing 'e', you can view the process's environment (if your user has the permissions for it, usually it has to be one of your processes). I'd been using htop for years and I never thought to look for how to do it because it never even occurred to me that it was something htop would do. So if no one had told me you could do it I would never have known.
Weird, it was always said that chaining the §&&§ and §||§ like that ain't an if-else statement but rather a "show the 3rd one only if the 1st command succeed but the 2nd failed", yet it also worked for me with Bash (I can't be arsed to make Zsh work right on my Ubuntu, it's way too much work even for me) with §rm -v foo§ O.o
@@tech_craft Yes, pushover is nice for notifications but pushbullet can do other useful things (on android, at least): read and write SMS in your browser (a real keyboard is great to send sms), share a clipboard between your computer and your phone,... I completly dropped pushbullet since I have an iphone
That isn't necessary for most people nowadays. If your default shell is zsh, you will almost always have encountered at least one "interactive" shell before you run any scripts. And the interactive shell will have sourced zshrc, which will have fixed your path. I'm guessing 99% of normal zsh users could just toss everything into zshrc and be perfectly happy. 😉
For notifications I actually use this BASH function using osascript (you can only do this for macOS): function alert() { osascript -e 'display notification "'$3'" with title "'$1'" subtitle "'$2'"' } I add it to my .zshrc file and just type `alert "Title" "Subtitle" "Description"`
This is probably the first video on terminal tips where all (except rsync) were new to me. Thanks for a great video of really helpful tools I didn't know about before.
Totally make this into a similar series and explore CLI tools vs only the ones you use. Can’t wait to get to my machine to try them all. Awesome work!
Very useful, thanks. Nicely presented. Told me exactly what I need to know without waffle or unnecessary musical accompaniment.
Thanks!
Thanks for the support Ron - very much appreciated.
It is not often that I subscribe to a channel after watching only one of its videos, but this video is significant! The content is clearly and well presented, to the point, and timely! I have subscribed. Thank you for this information. I will use these tools frequently. If I may, I'd like to ask a neurodiverse question. The advantages of using the terminal and command line's capabilities are clear. I have wanted to use the command line more often than I do. I am not fearful of using its application Terminal because I always read up on unknowns before implementing anything. I have a lot to learn. Luckily, I am technically minded and confident. So, fear of using Terminal is not a barrier for me, which is more common for others avoiding it. My reason for the slow adoption of the command line is a little different. I tend to remember and recall information visually. Whilst using Terminal, I make sure that I fully understand what I am doing. However, when I try to recall what I did at a later date, I struggle to remember it.
So, my question is, do you know of software with a GUI that can record actions like changes, installations, deletions and other significant changes made in Terminal?
I know asking for a GUI is somewhat contradictory when the command line and Terminal are concerned, but I see this as a way of ditching the majority of GUIs for just one. One visual app to see what I am doing would allow me to better learn and use the command line by remembering tasks by visualizing them in a timeline. Moreover, such a feature would allow me to undo or fix any mistakes when the repair is possible. Thank you for this information. I will be installing these immediately because they will save me both time and money. Cheers! ✊🧑🚒
Thanks for your kind words.
I'm not aware of anything that can visualise command history as a GUI.
Depending on the OS of your machine, you'll have some kind of command history file, for me it's `.zsh_history` in my home directory. You can configure this history to have timestamps so you could, in theory, power some kind of timeline.
I can trawl the history to see what commands I execute, searching for things like `apt install` or `brew install` to see what software I've added and removed.
It's an interesting idea to create some visualisation from that but sadly nothing seems to exist at the moment.
@@tech_craft Hey dude, sorry for my later reply to yours, and thanks for taking the time. A visualisation would work best, an example would be a graphical list with three elements, including; date and time, action (install, uninstall, other changes), and a representative icon. However, I didn't know of the history file you mentioned. I use Mac's, so I will check it out, thanks. Cheers mate. Rich.
As well as shell history, there’s “script” and “asciinema” which is closer to screen recording for a terminal. Not really what you’re looking for but it does capture output in addition to input.
You should definately install rsync from brew, the default MacOS installed rsync was last updated in 2006. With the brewed version you'll get a version that supports alternative (faster) checksum generation and compression algorithms (if rsyncing to another machine this is assuming the other machine has an up-to-date rsync as well, if not it will automatically fall back to the older protocol and inefficient algorithms).
I hadn’t even thought to check that. Thanks for the heads up!
Great tip. On my new MacBook Pro M1 Max the rsync version was 2.6.9. After running brew install rsync the version is now 3.2.4.
"faster hashes" ? What could top rsync which already uses the best one ?
@@rautamiekka I meant checksum generation, and I would hardly call md5/md4, as used in the macOS rsync, "the best one" and xxh is better (subjective) and faster (objective).
Does the brew version include APFS extended attributes? (I have vague recollections of some Apple versions of standard tools being tweaked for resource forks…)
This is an _extremely_ useful series on how to use Mac as an actual computer - the best way to get *ix experience on reliable hardware.
You got yourself a subscriber.
thanks for these awesome recommendations , especially for btop and ncdu
Thanks a lot for hinting rclone. That’s what I was missing for long time
Really useful bunch of tips. There are a couple here, rclone and ntfy that will be extremely useful to me. First time I've seen this channel pop up in my feed, and already subscribed on the strength of this video.
btop look really useful! gonna give it a try.
Dude I can watch a gazillion more commands please make more of this
It's common to use A && B to run B when A is true, and A || C to run C when A is false.
However, combining them into A && B || C is not the same as if A then B else C.
In this case, if A is true but B is false, C will run.
btop - great stuff! thanks for the suggestion. adding it to all my current and future servers!
this was very cool. thanks to your video, I've installed ncdu (Ubuntu terminal equivalent to windirstat I reckon), the exquisite/hack scene style btop and, especially, ntfy. Really useful tips. Thank you.
a great selection! Certainly I will try ntfy -- getting notifications on a smartphone sounds cool (a modern replacement for sending notification emails from cli)
Great video I was searching for a tool like rmlint. I also really like your terminal theme and was wondering if you would share it?
Sure. I'm using Dracula Theme pretty much everywhere: draculatheme.com/
Wow - superb video and some top tips there! Love your use case for ntfy! Subscribed 👍👌
Like the approach, thanks for these simple tools - I have way too many double files hahaha
Do you know of any utility to find near duplicate images? (Eg original vs compressed version of the same image) cheers!
I've not seen a general purpose utility for that. There's quite a few AI/ML systems for near duplicate matching but nothing wrapped up in a utility yet that I can see.
This video is really helpful, the terminal UI is really good too, will you make a tutorial on how to make our terminal UI like yours?
Thanks! I have a video that covers some of the setup here: ua-cam.com/video/8LcTA5m6_ts/v-deo.html
This covers everything apart from the configuration of the Kitty terminal editor on the Mac. Mostly, I've just used the Dracula colour theme for Kitty so it's not too hard to reproduce.
I will be doing a full video on this topic though.
Oh my god, spot on, what a great video without any BS. You are awesome 😎
Thanks for the kind words. I'm trying to make 'without any BS' my brand and it's heartening to hear that it resonates with people.
Excellent - subscribed on the spot - well done!
NTFY is super cool, thank you
Glad you like it - it's such a great tool I'm happy to share it with more people.
HammerSpoon is good for notifications too. I hadn’t heard of Pushbullet. I use AppleScript and Messages app for remote notifications on MacOS but haven’t sorted out other systems yet.
Great video. Regards from Colombia.
Okay. That was awesome! Thank you!
thanks for the videos! I really enjoy watching this channel
Adding to my list of useful: btop, ncdu, rmlint
Another useful? is neofetch; great way to get an eye-view of current machine capabilities.
I’ll give that one a go. Thanks for the heads up!
@@tech_craft I can not imagine a computer without neofetch/screenfetch/pfetch
Excellent video again. Very useful tips and great I can use these on my Mac as well as on my many Pis.
After a while I was hearing another word instead of rsync. I'm often accused of rsync around with my computer. 😉
😂 top class that one!
How do you get that fancy `cat` printout at 8:32? :)
That's `bat`. I showed that one off in this video: ua-cam.com/video/2OHrTQVlRMg/v-deo.html
@@tech_craft love it. Thanks!
Hello 👋🏿
Awesome video. I’ve been creative with rmlint and deleted som duplicates from very important files. Does rmlint have a recovery mode on deleted files?
Sadly not! Which platform are you running on?
@@tech_craft I’m on a MacBook Pro M1 💻
You could give Disk Drill a go and see if it can recover the files.
For me, rclone and ntfy look to be great additions for cloud tooling. I'm now sad to think that I'm coding for cloud uploads and task notifications on a task workflow management system which is the airflow on my pi cluster. And man this video is 2 years old. I'm kinda ashamed. I need some catch up to do. Subbed, sir.
Love the videos (and all others lately)
Implementing ipad + Pi as we speak
Very interesting and usefull, but one question:
I would like to ask what font you are using in your terminal?
It's JetBrains Mono: www.jetbrains.com/lp/mono/
@@tech_craft Thanks for very fast response.
super useful - thanks!
So, great content once again!! I just wanted to ask, I've been crazy looking for a tool to create a sync for files and working offline in my iPad (in order to use Obsidian, but I guess for emacs would happen the same). I wouldn't like to carry with me a Raspberry Pi every time I know that I'll be working offline, and I find Working Copy useless, except whenever I start hosting a gitea repository at home (the goal is to handle me my files while using end-to-end encryption and avoiding hosting my files in the cloud)
This is a tough point at the moment. I want the answer to be Syncthing which everywhere but iOS is incredible. Sadly, there's no native iOS support. There is an app for iOS called MobiusSync, but it's pretty lacking in features and hasn't been updated in a while.
I've been playing with hosting NextCloud at home and using that to expose files to my iPad. To connect back home I'm currently running Tailscale and Remote.it - testing both to see which is best.
This is actually an area I've been working on a lot and I have a series of videos coming up soon showing how I'm replacing iCloud/Dropbox etc. with open source, self-hosted software.
Thank you for this info!
Instant subscribed great video bro
Amazing video! Subbed!
Wow!! Those are all great 👍
Unison is an rsync-like tool useful for bidirectional syncing. A bit fussy about version skew between hosts but useful in some cases.
That’s a blast from the past. I used to use unison all the time before I started using Dropbox and then switched of Dropbox to Syncthing.
Great content, thanks!
Love this video! Straight to the point!
Great stuff!!
Do you have an iPhone pushback app on European App Stores? In the US app store it is not available right now.
I misspoke in the video - I have Pushover not Pushback on iOS.
Thanks a million!
Well done. Thx
ZSH allows you to use special mapping of environment variables. You can simply do:
# append
path+=('/home/geowar/extra/bin')
# or prepend
path=('/home/geowar/extra/bin' $path)
And skip the conditional lines.
The purpose of the conditional is to check that python3 is available. How does using `path` avoid that? From my testing it will still complain if `python3` isn't installed? Maybe I'm missing something obvious!
@@tech_craft My bad: My brain auto-translated that to the usual pre-check to see if the new path was already in the list of paths. FAIL!
No worries! Thanks for taking the time to comment - I really do appreciate it!
wish I'd known about rmlint ages ago -- much more reliable than fdupes! 👍
Thank you. Very clear and well structured.
(I am new to your channel)
This video is in your UA-cam playlist. How do get command line on an iPad? Do you have a video with instructions?
I am keen to buy and set up an iPad for software development.
(I have not watched any of your Pi videos)
Thanks for the kind words!
The Pi videos are the best place to start, probably this one as the best intro: ua-cam.com/video/A3qn1nqw-Gw/v-deo.html.
I haven't done a video yet on what the command line looks like on the iPad _without_ the Pi. In essence the best two choices are A-Shell and iSH. I have a video about them on my content backlog.
@@tech_craft thanks for the detailed reply. I'm looking forward to all your videos
Not sure if you already have, but would be nice to do a tmux video
Just noticed that you have and it is an awesome video! tmux is king
Btop is amazing !
very interesting!!!
I didn't know rlint, but rdfind works for me. I had a ton of duplicated data and chose to keep them in both places, just with rdfind -makehardlinks true. Keep in mind that this requires support for hardlinks on the filesystem (meaning most stuff except FAT, NTFS and exFAT) and that it won't work across filesystems.
Nice one. That's been added to tool list!
@@tech_craft btw, IIRC NTFS also supports hardlinks, but I'm not sure if Linux' drivers can handle that
do you happen to know how rmlint verifies that files are duplicates? what if there are similar files with the same filename and file size? i am thinking a checksum of large files would take too long. i didn’t immediately see this explained in their manual but i also haven’t had the time to delve into it either.
It does run a hash to figure out if files are the same. You control the type of hash using the paranoia setting 😂 rmlint.readthedocs.io/en/latest/tutorial.html#paranoia-mode
8:39 - Pushbullet on iOS?
I misspoke. It’s Pushover
@@tech_craft Oh interesting, I will give it a try, thanks!
Is there any cli app out there who will able to manage all installed cli apps? It might be headache to remember all of its names.
That's good question, and it's a rich area of choices. If you're using Homebrew on the Mac then you can run `brew dump` to get a bundle file that lists all your installed software.
That same file can be replayed using `brew bundle` to install all the software on a new machine or when reinstalling.
For something more sophisticated you have tools like Ansible or Nix. Both are comprehensive solutions but have a pretty steep learning curve!
Since pushbullet isn't available for iOS anymore, what would you suggest?
I said Pushbullet but meant Pushover 🤦🏻♂️ I’ve been using pushover for a while now and it’s been working well.
This is a feature of htop but btop must have it: By selecting a process and pressing 'e', you can view the process's environment (if your user has the permissions for it, usually it has to be one of your processes).
I'd been using htop for years and I never thought to look for how to do it because it never even occurred to me that it was something htop would do. So if no one had told me you could do it I would never have known.
nice video
Good video.
Weird, it was always said that chaining the §&&§ and §||§ like that ain't an if-else statement but rather a "show the 3rd one only if the 1st command succeed but the 2nd failed", yet it also worked for me with Bash (I can't be arsed to make Zsh work right on my Ubuntu, it's way too much work even for me) with §rm -v foo§ O.o
The best cli tool is 'fuck'. If you misspelled a command you just type fuck and it autocorrects the bad command.
NTFY is now in Homebrew...
Glad to be the 1,000th like!
How do you use pushbullet on your iphone, I thought only android devices are supported since a few years?
I realise I said pushbullet but I meant pushover. I was reading the ntfy docs and had the name stuck in my head!
@@tech_craft Oh yes, it's a shame Pushbullet was a really good tool. It think my next phone will be an Android because I miss this app
Have you tried Pushover? I'm not sure how they compare, but Pushover is pretty nice for my use cases.
@@tech_craft Yes, pushover is nice for notifications but pushbullet can do other useful things (on android, at least): read and write SMS in your browser (a real keyboard is great to send sms), share a clipboard between your computer and your phone,... I completly dropped pushbullet since I have an iphone
The only reason i love mac more than windows is that it has bash instead of powershell and cmd
Is pushbullet available on iOS?
I misspoke. I’m actually using Pushover on iOS.
How do dupe files happen like that? I wouldn’t ever expect to have duplicate files because I maintain all my files.
shouldn’t btop be bpytop?
btop is the latest revision of bpytop, this time written in C++
BashTOP became BPyTOP when it was ported from Bash to Python. Then BPyTOP was ported to C++ and became BTOP.
@@RedBearAK good to know, thx
👍👍
Path modifications should be done in the .zshenv file; not .zshrc.
That isn't necessary for most people nowadays. If your default shell is zsh, you will almost always have encountered at least one "interactive" shell before you run any scripts. And the interactive shell will have sourced zshrc, which will have fixed your path. I'm guessing 99% of normal zsh users could just toss everything into zshrc and be perfectly happy. 😉
I tend to put PATH changes for interactive commands into .zshrc to reduce the scope of that change. YMMV.
@@traal Dear StackOverFlow: Why won't my .zshrc path modifications work for my non-interactive scripts? [\satire]
ntfy = notify-send on linux
*ncdu = ncurses-based du viewer
IMD should be in here
That's a new one to me. Do you have a link, I'd love to try it out.
@@tech_craft Here's the github link github.com/Noah-Arcouette/imd
Windows users watching this
I think all of these will work in WSL2 but I haven't had a chance to try.
For notifications I actually use this BASH function using osascript (you can only do this for macOS):
function alert() {
osascript -e 'display notification "'$3'" with title "'$1'" subtitle "'$2'"'
}
I add it to my .zshrc file and just type `alert "Title" "Subtitle" "Description"`
Great video. Thanks