Also look at the Use% column, to which I added an arrow- it shows me visually that most of my disk is free.īoth show the same data, but I have to spend 10-20 minutes with du finding the correct flags and then understanding the output. What does 1k-blocks mean? Also, it tells me I have 233583156 bytes free- what the hell is that? Are we back in the 5.25 inch floppy disk days where you could measure file size in bytes? (There is a flag to get the size in human readable form but I can never remember what it is) Previously I've written Python scripts to make sense of this, but the newer duf and dust make this a breeze. Again, very poor UX and it's often painful. The problem with both du and df is they dump a lot of info on you and expect you to make sense of them. So if Im seeing disk problems, I'll use duf to find how much free space I have, then dust to find which folders and which subfolders/files are taking up the most space df or dust are used to find out which folders on your drive are taking up the most space. As you will see, they both work well together.ĭu or duf are used to find out how much free space the various drives on your device have. It still doesn't always find the file if you get the case wrong:Ībove it just lists all the files in the directory and expects you to manually search through it- I guess? Because I have nothing better to do?įd automatically searches in the current directory, searches case insensitivelyĪnd it colour codes the output, so you know which is the directory and which is the file.ĭuf and Dust as a replacement for duf and du respectively on Linux- I often use these together so I will talk about them together. to let it know to search in the current directory. And each time I scream Just chucking search in the current directory! The absolutely worst part- find expects you to tell you where to search and will exit with a generic error if you don't specify. FdFind (also known as just fd)įind is my favourite Linux tool, it is super powerful if you want to find files in the current folder or subfolders.Īnd yet, every time I use it, I pull my hair. There are short cuts for all the major utilities. The above are short cuts for git commit -am "message" git pushįor docker compose instead of: docker-compose downĭcupd is a lot quicker to type than docker-compose up -detached. They contain shortcuts for popular commands which make typing really easy. Like if I type g and press up, I get git pull which I ran lastĪll these minor improvements are great, but the best feature of Zsh is the Oh-my-Zsh add-ons. Like if you type one letter and press up, it shows you the last command you ran. There are dozens of such small improvements that I can't go over all of them. Zsh goes one step further- if you have multiple files/folders, you can select between them using your cursor: Even Windows Powershell is better in this regard as it allows case insensitive tab completions. Bash allows tab completion, but if you forget the name of the file/folder, or get the case wrong, it won't complete but just sit there stupidly. So much so that it's the first thing I install on any remote machine, if I plan to use it for more than 10 minutes. For a long time, I wondered if it was worth the hassle of learning a new shell, but boy does Zsh blow bash out of the water. Not technically a command line utility, but a full blown replacement for bash. These are some of the best command line utilities I've come across, ones I highly recommend. The functionality might be the same but the UX(or is it developer experience) is a million times better. If you are still using utilities written 30 years ago ( groan) you will be in for a surprise. In the last few years, there has been a renaissance in command-line utilities.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |