for a video with such a general title I didn't expect you to talk about wc for so long
@KatzRool3 жыл бұрын
so true
@Steerable68273 жыл бұрын
Another example: parted, fdisk, cfdisk, sfdisk, gdisk cgdisk, sgdisk
@demipy3 жыл бұрын
Well they have quiet different features tho. And even different purposes
@Steerable68273 жыл бұрын
@@demipy i get what you mean, but many people use them for the exact same purpose with no differences but the app they choose to use
@demipy3 жыл бұрын
@@Steerable6827 yea thats right - but this seems to come down to personal preferences of guide writers. Every guide uses another one :D
@solarwolf6783 жыл бұрын
I feel like a noob that I only used gparted, cfdisk, and cgdisk
@lawrencedoliveiro91043 жыл бұрын
I thought it would be worthwhile to back up the partition tables on my disks, just on the off chance they get corrupted somehow. I use “sfdisk -d” for this. This can be restored without overwriting the boot loader. Do the other partitioning tools offer similar functionality? I remember being scared off parted some years ago because it could not accurately restore partition locations. I think that might be fixed now.
@agemans_stuff3 жыл бұрын
Linux is impressing. I used Windows for almost 30 years and I loved it. But since about two years I switched to Linux, because my harddisk crashed during an unstoppable Windows update and I will never switch back to Windows again. I really love the freedom Linux is giving me.
@lakshaynz3 жыл бұрын
this happened to me a few years ago in middle of uni, I started using Linux instead of windows in my laptop and today I work as a DevOps engineer and work with linux mostly. Thanks to the BSOD. It made me learn linux which helped me get this job :)
@konstantink07 Жыл бұрын
@@lakshaynzit wasn't "thanks to the bsod", it was thanks to crashes that caused it to appear🤦♂️ Linux with Systemd is getting one too btw, and it's a good thing!
@yeswhynot46593 жыл бұрын
Hey DT, you can use the 'count' command in the fish shell for the same result. For example, 'pacman -Qq | count' is the same as 'pacman -Qq | wc -l', just with an easier to read syntax. This also works with count $VAR or count < FILE
@blank-mq8ef3 жыл бұрын
if its a fish specific thing i understand not showing it since most distros dont use fish as the default shell
@yeswhynot46593 жыл бұрын
@@blank-mq8efYes, I agree. I just mentioned it because DT used fish in this video.
@huantian3 жыл бұрын
Do take care, as apparently llvm includes a count binary as well, which does something different.
@blank-mq8ef3 жыл бұрын
@@yeswhynot4659 ye i getcha, i use fish myself so its gonna be useful for me, but it would have confused the shit out of me when i started using linux a year ago
@SimGunther3 жыл бұрын
Let's do a REAL rework of all the binutil programs, not just fancy recoloring or tablature of old programs!
@user-he4ef9br7z3 жыл бұрын
no
@0xDEAD_Inside3 жыл бұрын
Yes
@syedahkam71643 жыл бұрын
Like what?
@valsharess-yt3 жыл бұрын
U wot m8
@SimGunther3 жыл бұрын
@@syedahkam7164 +1 to fixing unused/poor flags +1 to fixing security issues with binutils -1 to having 6+ commands that do literally the same thing -1 to programs like exa and bat whose sole purpose is to recolor/prettify existing commands +1 for SIMD usage +1 for JIT/compile time computations +1 for better user experience improvements and legibility via the terminal such that we can toggle between table view and terminal/try view if necessary
@demerit53 жыл бұрын
Love your videos. Thank you for another great upload
@enslaven00bs3 жыл бұрын
You don't need to cat into wc. You can run wc directly on the file.
@dkosmari3 жыл бұрын
Or you can be a sigma user and cat into cat into cat into cat into cat until you fill the whole line with cats and pipes.
@danielvo37503 жыл бұрын
i think he said he only wanted the count and running wc directly on the file also returns the filename as well
@matthiaswindrich96973 жыл бұрын
I'm also thinking that teaching new linux users about the useless use of cat would have been more valuable than omitting the file name in the output of wc -l filename. One could use the following: wc -l < /etc/hosts
@alejandrogastonfigueroaame46933 жыл бұрын
WC uses the kernel to read the file, and hence pretty fast. You can use the same code to read your files into memory. Big files. It takes you just to type a couple of letters ... This is a big difference when you are crafting piped/nested commands.
@PhilipHarwell3 жыл бұрын
I really enjoyed this video!
@lawrencedoliveiro91043 жыл бұрын
8:44 If you want a ready-made empty file to demonstrate your point, try /dev/null.
@vince67923 жыл бұрын
Great learning vid DT! More help with terminal commands will help new and intermediate users. So many people are intimidates by the terminal when in actuality it's incredibly useful in so many numerous ways. Thanks DT 😌
@dontdex82213 жыл бұрын
Learn what? He's being elitist
@alexandermendez90133 жыл бұрын
@@dontdex8221 lol
@vince67923 жыл бұрын
@@dontdex8221 your ideology isn't going to get you far. He's inadvertently teaching Linux users terminal commands are nothing to fear and helpful to the end user with an example which is how we learn best for the most part. Elitist 🙄
@paulspl25813 жыл бұрын
@@dontdex8221 he can be elitist and still teach things. Also it's inherently wrong to be elitist. I consider myself an elitist, I want the best for the community
@vince67923 жыл бұрын
@@paulspl2581 an elitist is an over inflated egotistical self worth and image. By any metric chosen to measure it's impact on merits it miserably fails in terms of character which is the driving force of achievement. Discipline, determination, and hard work would serve you and your community far better with a sense of humble humility.
@SlyPearTree3 жыл бұрын
"Is there anything you can't do with grep, sed or awk?" Make them go out in the cold to buy beer.
@BrucesWorldofStuff3 жыл бұрын
Or Bourbon... :-p
@ashwinalagiri-rajan11803 жыл бұрын
You can probably get them to do that too 😂
@ped7g3 жыл бұрын
ok, that's probably too difficult for them, but how long were you sitting and staring at the screen before you found that one? I would assume like hours, considering how grep+sed+awk can do pretty much ANYTHING... [almost]... :)
@glensmith4913 жыл бұрын
You just have to be specific. If you want them to BUY beer, you have to use the -brand, -beer and -store flags (you have to use a store that delivers and you need an internet connection).
@umka75363 жыл бұрын
wc -l "file-name" works fine. No need to cat.
@AndyDavis0073 жыл бұрын
Hey DT a nube question here generally far from related to this topic. When you publish a video here, are you also posting an nft to KZbin's ledger?
@rajneesh00453 жыл бұрын
One of the best LUT so far
@plutorocks13 жыл бұрын
Not gonna lie but your voice gives me sorta high confidence and makes me feel more interested in Linux
@AshnSilvercorp3 жыл бұрын
This was me with chmod and chown. I kept trying to understand chmod to change permissions and ownership and just gave up because chown let me do the same thing.
@backseatgaming21453 жыл бұрын
Duct tape everything with chmod -R 777
@AshnSilvercorp3 жыл бұрын
@@backseatgaming2145 even I don't know everything about Linux yet and I'm certain that is the equivalent of deleting system 32.
@backseatgaming21453 жыл бұрын
@@AshnSilvercorp no, the equivalent of deleting system32 would be to sudo rm -rf /* or even just /usr chmod -R 777 when applied to a directory recursively grants full access to each file and directory inside it to everyone (rwx to owner, group and others) That breaks some programs that check access rights (for example ssh) but it's more of a security concern than literally nuking your system It's a common "easy fix" when some program can't access a place due to incorrect configuration and obviously a pretty bad one)
@AshnSilvercorp3 жыл бұрын
@@backseatgaming2145 something like that. That was another reason why I didn't use chmod because most were just saying "use this chmod command to make the file public." I'm the only user on my system, but even I know that's a potential security problem.
@backseatgaming21453 жыл бұрын
@@AshnSilvercorp thats's cool, user experience is always better when you think what you're doing, but if you have not done it yet, i really suggest reading a bit about chmod and access rights in general. It's really beneficial to understand them and can help troubleshooting and even solving issues. I have a recent example with docker, something happened with my config and my user wasn't allowed to use /var/run/docker.sock and i fixed it with chmod
@chuanqisun3 жыл бұрын
The diversity of species in any ecosystem is always a "feature", not a "bug".
@vince67923 жыл бұрын
This sounds academically correct until you determine the definition of 'bug'. This hypothesis is no longer scientifically correct regardless of the analogy being evolutionary or pro creation
@nolan4123 жыл бұрын
Could also use Emacs, Ruby, Python, Perl, etc etc. Or Bash's read function.
@nolan4123 жыл бұрын
That read function has some power too.
@Not-THAT-ChrisPratt3 жыл бұрын
NOOO! Just as there MUST BE just ONE Linux Distro, there MUST BE just ONE way to do this, and ONLY ONE!!!! Just kidding, another great video on the flexibility of Linux and the CLI. Thank you so very much!
@kylebaker18393 жыл бұрын
Is that the angels and airwaves logo I see in the background.
@Gooberpatrol663 жыл бұрын
Suckless devs be like: "let's find all the ways to do something and remove all but one"
@gwgux3 жыл бұрын
It's good we have so many different ways of doing the same thing. The more we reinvent the wheel, the more wheels we have to choose from to better fit the situation we're in.
@nyrization3 жыл бұрын
why wheel have to be round lets make it square !! so many ideas !!
@stephanhuebner49313 жыл бұрын
Yes, and it's fun to have countless people bickering about what solution works best (where "more convoluted" is better) instead of doing something that actually makes Linux easier to use.
@gwgux3 жыл бұрын
@@nyrization lol, Triangles FTW!
@PaulvanSchaik3 жыл бұрын
He DT, thanks for the video, learning new things every day. What’s the color-things at term start?
@sudomyju50173 жыл бұрын
hi! Could you please share what is that desktop wm and terminal app /shell combination you are using here?
@ssteward19923 жыл бұрын
Pretty sure he uses XMONAD as the WM and uses Alacritty+Fish as his terminal emulator/shell combo.
@sudomyju50173 жыл бұрын
@@ssteward1992 loox cool, tx
@thundreturtle3 жыл бұрын
There is nothing you can not do with awk, sed and grep
@007arek3 жыл бұрын
Awk as a programming language is very limited.
@AndersJackson3 жыл бұрын
Why use cat(1) and pipe into wc(1) and nl(1), when you can add that to the commands directly? tee(1) are actually a reason to pipe like that. Create an empty file with touch(1) command. Except that, good introduction, as usually.
@tk36_real3 жыл бұрын
Hey, I'm sure this makes sense to someone who isn't actually a beginner, but HERE I AM. I was just always wondering what these numbers mean, and as you seem to know I couldn't not ask you 🤗 Sorry to distract from the content, but first things first, right?
@tk36_real3 жыл бұрын
@gu4t4f4c thanks 👍
@konstantink07 Жыл бұрын
touch is BLOATED🫃, use ">"🗿
@evilzach15863 жыл бұрын
he should rename the video to 5 ways to get a line count
@EkmekArasiKofte2423 жыл бұрын
Why linux over BSD?
@dansimpson68443 жыл бұрын
CAT TAIL CUT ! - I'm glad my feline friend does not understand FORTH!
@nxzthelinuxguy51923 жыл бұрын
Always loved dt scripting tutorials. Makes me feel superman.
@MerkDolf3 жыл бұрын
You can't buy coffee with grep, sed, or awk!
@ovopax3 жыл бұрын
Not with that attitude!
@antidotejack27713 жыл бұрын
Hey DT, I want to insert a Sim card in my desktop and I want to be able to connect to my ISP network and make cellphone call, send messages and get 4g LTE Internet; How can I do that?
@elclippo41823 жыл бұрын
You will need a 3.5“ floppy disk drive where you can put your SIM card in.
@antidotejack27713 жыл бұрын
@@elclippo4182 floppy disk 🤔
@RetroSmoo3 жыл бұрын
I just keep sim in a phone then use usb tethering to use the internet, dunno about calling etc tho
@sys9353 жыл бұрын
Thats called modem usb you can make calls sms and Internet over wireless through usb modem dongle and you can also sms auto respon etc if you download and install the modem drivers
@sys9353 жыл бұрын
You can also use your phone to connect to adb
@ultimatebot27243 жыл бұрын
on an empty file doesn't sed return an error code
@petrlosev66113 жыл бұрын
command | less -N +G
@OldieBugger3 жыл бұрын
There are many features in GNU/Linux that make me laugh. Thanks for this one.
@elizabeththompson44243 жыл бұрын
yeah but from different angles... lsblk then I can get the same info using findmnt but from a different direction using the disk mount directory instead of the device directory don't things present the information differently and if I don't like it I can pipe it through an awk/sed script and get it the way I want Linux gives you options unlike Windows which is their way or no way 🤪🔥💥💀
@sergey96793 жыл бұрын
This color grading makes picture look unnatural.
@kevinwood50483 жыл бұрын
Hey all of you useless-use-of-cat haters. Nothing wrong with using cat to pipe output to another command that can read from either standard input or the file. I actually find it easier to start out with cat. You can always optimize it out in a shell script later. Put that in your pipe and smoke it! 😉
@lawrencedoliveiro91043 жыл бұрын
Don’t you mean, “Put that through cat into your pipe and smoke it”?
@kashantariq99873 жыл бұрын
If this isn't bloat, idk what is
@nyrization3 жыл бұрын
diversity is our strength
@rahilarious3 жыл бұрын
"there are million ways to do stuff" point noted but out so many useful topics to cover it's disappointing to see u pick such topics and ramble for 10mins,not productive content. You've got awesome knowledge, setup nd platform to educate people, take advantage of it. just to name few topics i would love to see u go indepth (in case running out of content) nftables (modern iptables), tmux, gimp, LFS build, customizing own kernel ...
@007arek3 жыл бұрын
I don't agree with you. Learning small tools is better for scripting and more handy than the tutorial about gimp or tmux that are only useful in specific use case.
@user-he4ef9br7z3 жыл бұрын
You can't condense complex software like tmux, iptables or LFS into youtube videos. It's just not efficient, manuals exist for a reason and experienced users know how to utilize them. Linux videos on youtube serve a different purpose.
@rahilarious3 жыл бұрын
@@user-he4ef9br7z well manual also exists for complex soft like emacs yet he recently made video on that
@nonenothingnull3 жыл бұрын
>rickrollrc
@gjermundification3 жыл бұрын
`exa -lT`
@mhasadi783 жыл бұрын
Wow your system is kinda bloated. My arch system has about 1200 packages.
@user-he4ef9br7z3 жыл бұрын
Of course his system would be bloated, he's a youtuber. He needs to test out stuff and make videos.
@vilhelmbergse36863 жыл бұрын
This video was a waste of time imho. You could have talked about the reason there are many ways of doing one thing on linux, or what that entails. But no, you just drag out the length of the video and milk that adsense. 👎 from me.
@nolan4123 жыл бұрын
Bottom line: it's GNU.
@rahilarious3 жыл бұрын
felt the same... it's been like that since quite few time. Distro reviews are waste too (what's the point of knowing what default apps they've installed!?)
@subterfugue3 жыл бұрын
The reason there are many ways of doing one thing in Linux is the same for why there are many ways of doing one thing in everything.
@dontdex82213 жыл бұрын
blkid ls blk
@starrymohannad3 жыл бұрын
third
@DistroTube3 жыл бұрын
Confirmed!
@starrymohannad3 жыл бұрын
@@DistroTube time repeats it self
@Penderdrill3 жыл бұрын
SECOND!!!
@othernicksweretaken3 жыл бұрын
@04:28 actually an aspirant for the useless use of cat award (according to Randal Schwartz) here ;-) instead of cat ~/.bashrc|wc -l this will do the same wc -l ~/.bashrc
@DistroTube3 жыл бұрын
Actually...'wc -l filename' and 'cat filename | wc -l' do not output the same thing. Try them both and you will see. ;)