Hacker News new | past | comments | ask | show | jobs | submit login
How many Linux commands can a 7 year old learn? (thejavaguy.org)
176 points by ivanche on May 7, 2022 | hide | past | favorite | 141 comments



Honestly the command line seems less conceptually challenging than having to learn a gui and all its abstractions first. Think of copying and pasting a file in mac os and explaining it to someone for the first time:

"ok, now open finder. its in the dock. you have to move the mouse to the bottom of the screen. its the man with the face. ok now we need to get to the file. ok where did you put it? ok lets click to it. is that it? ok right click. lets find copy. great where is it going, click back, its the button up there, click back again, click it one more time, lets go forward again, ok in that folder, click on the name, no thats a triple click click somewhere else and lets try again, ok double click, ok now we are in, ok right click, paste."

versus

"type cp filefromyada toyada and press enter"

A lot of people are so used to the GUI that they get scared of having to learn to walk again practically and diving into the cli. But if you never learned all the hoops and crap we have to deal with finagling stuff around a modern gui, I think you'd be able to do a lot more powerful things a lot faster starting with the cli from the beginning. I really wish I grew up learning the cli vs the gui, personally. guis also frequently change whereas the cli feels like its etched in stone (or you can use a container with whatever version of the stone you like)


Learning anything is easy if you only focus on the happy path where everything works as expected. The challenge of a command line, or a badly designed GUI, is discovering what to do next if what you tried first doesn't work. Your 'cp' example is good - how do you fix it if your current user doesn't have write permission to the location you're trying to copy to, or if the disk is full, or if it's a volume that worked last time but it's not mounted now, or any one of many hundreds of reasons why a file can't be copied. The process of copying a file is suddenly a blackbox of other commands, processes, and concepts that the system doesn't immediately tell you about. You're dropped into the fun world of learning about users, groups, permissions, volumes, etc. That's probably OK if your goal is to learn how to use the OS, but if you're just trying to copy a file it's incredibly frustrating.

The benefit of a well designed GUI is that it can give you high quality feedback, or block you even trying to do something in the first place, because it's contextually aware. Command line commands can only give you an error after trying something.

Good software makes recovering from a problem as painless as possible. In general command line apps are quite bad at that.


> The benefit of a well designed GUI is that it can give you high quality feedback,

In theory, yes. In practice, what happens is the progress bar would seem to freeze.

What do you do now? Some computers still have a blinking HDD LED, maybe you can glance there.

Otherwise you have to know a great deal of the mechanics behind the curtain to find where the relevant log is, and how to inspect the running process. Is it a stale mount? A shared library that wasn't found? Or perhaps an automatic operation triggered on a magic filename?

A CLI has the benefit on being conceptually simple. There's going to be a result, and it's going to the console. It may be cryptic, and you may have to look up the meaning it it's something unusual (notorious ones like "lp0 on fire" are the joke of the Internet, hilariously cryptic GUI messages are a dime a dozen), but it's seldom going to surprise you. It's not going to freeze the terminal, or suddenly boil your coffee.

It's certainly not the silver bullet that fits all, but things that are conceptually simple are often a good default.


> There's going to be a result, and it's going to the console.

If you're lucky. The kind of things that make a UI freeze often make a CLI freeze too. If you're unlucky, you end up with an unkillable process. Or, more confusingly, a process that garbles up your shell until you reset it.


The other benefit of a GUI is that you don't have to spend time learning things you'll use once a year, and then relearning them every time.

I don't remember any of the syntax for commands I haven't used in the last month or so. GUIs are very fast for one off tasks like "Sort this CSV and only take these 3 columns".

LibreOffice loads faster than I can read 3 different man pages and figure out commands I haven't had a reason to use in months.

Plus, commands tend to be less integrated, and there are some things that GUIs automate very well, that would require writing your own automation in the CLI, and I like workflows with an absolute minimum of ad hoc software.


The permissions problem depends on the ls -l knowledge. The disk full problem is another good example of fundamental knowledge that supports error recovery.

There’s a minimum level of knowledge required to solve problems on your own at the command line. Another 5 sessions would do it.

I imagine the GUI is similar but harder to quantify since spatial knowledge is more innate. I remember being 10 and fiddling with a computer UI without knowing anything. I figured out selecting and dragging on my own but not double clicking to open.


> Your 'cp' example is good - how do you fix it if your current user doesn't have write permission to the location you're trying to copy to, or if the disk is full, or if it's a volume that worked last time but it's not mounted now, or any one of many hundreds of reasons why a file can't be copied.

All of those problems could also occur with the GUI approach, and I'm not sure the error messages would allow a novice to fix the problem any better than on the command line.


They don't. In a GUI a directory you don't have permission to write to is greyed out, or shows a "no entry" cursor when you drag something to it. An unmounted volume just isn't shown in the first place. A full disk shows an error saying how much space is needed, or asks you to free up space.


> In a GUI a directory you don't have permission to write to is greyed out, or shows a "no entry" cursor when you drag something to it.

Neither happens on macOS. Instead, I can drag the file as usual, but then I'm shown a dialog which asks me to login. It doesn't do a brilliant job of explaining the problem, but it's probably better on balance than the command line's "Permission denied".

> An unmounted volume just isn't shown in the first place.

Is this significantly different from the volume not being listed under /Volumes (again, this is where it turns up on macOS)? I think I almost always use tab-completion with that directory anyway because volumes rarely have reasonable names.

> A full disk shows an error saying how much space is needed, or asks you to free up space.

I'd be surprised if the command-line error wasn't similar, tbh.


The CLI is conceptually aimple to grasp for most things: you type something, the computer does something. If you type the wrong thing it will tell you.

Piping commands etc is conceptually more intricate, but the good thing is, that even without it you can get quite far already.


I've helped some older people and found the same. The command line gives some users more confidence. Hearing that "the computer does exactly what you tell it to", but "it's dumb, so you have to tell it very precisely" is more empowering than being expected to click around and figure out how things work.


That reminds me of the speech the head of the computer science department gave at the start of my course.

“The best thing about computers is they do exactly what you tell them to do. The worst thing about computers is they do exactly what you tell them to do.”


The computer does exactly what you tell it to do, but never what you mean.


I feel like the point you’re making has never been less true. Dialog boxes with “not yet” rather that “no” are ever more popular. I don’t think that the modern UX designer has much respect for me or my intentions.


GUIs give you a clear venue for exploration (click around), which is how kids dive into them.

CLI requires reading and writing, and usually in English — at the very least, Latin script.

I don't know how I would feel if I didn't grow on the CLI (back in the DOS days), but I'd say CLI is a faster way to do most things other than selecting by visual data (eg. find all images with mountains in this folder of 1000 files) — at some point, ML will help that bridge get crossed too.


Well true, but playing Police Quest somehow also just worked when it has a command line.


>"type cp filefromyada toyada and press enter"

so hit the 't' key, followed by the 'y' key ,,, followed by the enter key to copy this file. While this is a trite example, how many linux how-do-I-do-this's get resolved with copy this command with half a dozen flags[0] into your terminal?

The underlying problem with CLI is they lack information about the underlying structural logic and discoverability about the interaction. This makes it hard to impossible to extend 'copy this file' to 'open this file', or 'make this file read only'. In a (decent) GUI once 'left-click select' 'double-click open' and 'right-click options' is understood the rest is spelled out. Unlike with a CLI, where one needs to remember 'ls'[1] there are only two buttons on a mouse.

I absolutely agree GUI changes - especially paradigm changes - are a plague though.

[0]Which invariably seem to have a different obtuse formatting from the last command I had to copy.

[1]Which stands for what anyway?


> Which stands for what anyway?

I'd always figured it stood for something like "listing" but if it doesn't, who cares, no one's gonna have a problem remembering it.

> there are only two buttons on a mouse

There are 3 buttons on the mouse, plus 3-4 modifier keys (shift, alt, control, logo) on the keyboard, which are sometimes used in combination. Usually not more than 2 modifier keys are used at a time, so that gives us four (single mod) plus four choose two (two mods) modifier combinations, times three for each mouse button, equals 30 different actions, which are usually not well discoverable.


> 1]Which stands for what anyway?

Ahhah. My favourite question when some fanboy starts to evangelize the ease of use.

It's 'list segments', from Multics, AFAIK.


You could say the same thing about double-clicking — what does that 'stand for'? Thankfully, in either case, it really doesn't matter. Both have their advantages and disadvantages, of course. Maybe 'double click a file to open it' is easier to remember than 'ls means show files' but 'when do i double-click and when do I single-click' is notoriously difficult for novice users to remember.


With half a dozen flags you're talking about an operation like "hard link all the files older than a week, preserving metadata", which honestly would not be easy for the average user independently of the user interface used.


@[1]: 'list', I assume.


You skipped the part about learning what a directly path is, and how to find the names of all the subdirs in the paths.


You could explain the file system hierarchy and how to built a path string with a sheet of paper and a pen and a minute or two. That part isn't the hard part of the cli IMO. When you want to find the names of the subdirs, then you introduce ls. Now you know two powerful command line tools, cp and ls, in a few minutes of explanation.


If you want to teach a kid the command line, I highly recommend ‘sl’ as a first command - my two-year-old had never forgotten it: https://github.com/mtoyoda/sl


I honestly cannot remember ever typing sl instead of ls. Funny little “utility” in place there. It doesn’t appear to be part of a minimal Ubuntu installation, have you found it install “out of the box” with any Linux distros?


Doesn’t happen for “ls” for me, but I type “funciton” and “exmaple” all the time.


I basically never make any letter swap typos at all. I guess it's more common with faster typists that are using more fingers at once, and going fast enough that they aren't thinking one individual letters?


Maybe you forget about them.

I never noticed myself doing it either. But after learning of Emacs (and MacOS) "transpose" shortcut C-t (aka Control-T on macs), I find I use it about once every 1-2 weeks.

It's not even faster than deleting the word and re-typing it, no. It's just funny.


I did not know about transpose but I am now fully convinced that Emacs shortcuts can be art.

Really, I tried it out and giggled out loud. Now how do I go about sharing this joke with my friends? "It all started in 1976... let me tell you about bucky bits."


Lol I would not have guessed Mac would have a shortcut like that!


Yeah, it's great, and that's not the only one. Mac OS supports a whole bunch of emacs style text editing commands. I wish I could replicate in Linux.


I find that it largely depends on the keyboard that I'm using, but I can think of two scenarios when it happens to me.

If I'm typing at a steady pace ( no matter the speed), when a finger doesn't get the tactile feedback it expects, it may hesitate while the next finger strikes the next key on the same pace.

And for short commands like, `ls` or `cat`, I often hit the all the letters at nearly the same time which can swap letters.


Slow typist here, I make letter swap typos all the time. Cmd+T is my best friend.

Curious if other aphantastics are similarly slow/error prone? I cannot visualize a keyboard, and while I can usually type without looking, my form is poor and I do steal occasional glances.


I don't think aphantasia matters here.

I don't have a visual representation of the keyboard in my mind at all, but having touch typed (imperfectly) since high school, I can tell when I mistyped a key by feel too (eg. not looking at the output on the screen either, your muscle memory will let you know if any movement was awkard or unexpected).

FWIW, it's important to learn where the "corrective" (backspace, delete, cursor movement...) keys are on your keyboard while looking at the output: then you can easily push yourself to not look down on the keyboard while practicing.


Aphantastic here. I never learned to visualize a keyboard and went with blank keycaps to force myself to learn with weeks of painful brute force muscle memory. I learned Colemak which is much less finger travel and helped too as many words can be typed with home row.

I also do everything I possibly can on the command line because it is -one- interface to learn with a universal history to reference past commands vs randomly mucking about in GUI interfaces I can not picture in my head that are wildly different in every application.


Aphantastic here to say I have always had pretty great touch typing. In high school I would touch type on a HW keyboard phone - great to reply to texts while looking at my teacher for their presentation.

I do make mistakes but I don't feel particularly slow or error prone. As I said elsewhere I like to use the C-t command to fix letter swaps and I get them definitely less than once per normal day.


I never visualize the keyboard even though I could, it's all muscle memory.


Huh, maybe it has more to do with whether you type without looking or not?


Anecdotally I'm 130wpm+ and I make that typo a few times a week.


recent distros or of all time?


Any, I was just curious. :)



At 7 I was banging on an electric typewriter and red LED calculator. My mother could explain how pressing a typewriter key triggered a typebar and left an impression with ribbon. Fascinating. She couldn't explain how the calculator worked, but she let me punch the numbers in when she was balancing the checkbook and how it all added up. Magical.

A few years later and I was typing in c64 basic programs from the back of magazines. Then it was I showing my father how to schedule and print little league baseball games, and my mother how to track her bowling tournament results.

Thanks for sharing your story. It is amazing what kids can do with just a bit of a nudge.


I just want to convey my appreciation of how you gave back to your parents, with dividend, the knowledge built upon the foundation they laid for you.


At 10 or 11 years old, I made my Mom a random number generator for picking Lotto numbers. I knew it wouldn't make a difference to the odds, but it made her happy...


As I was reading OP's story I flashbacked to my first introduction to technology at that age. I'm most grateful for them raising me intellectually curious, reading to me at a young age, and to never say no when I asked them to buy me a book.

My father (84 now) is up to date with technology, he gets the mechanics and can perform his tasks (windows, android, roku) but I don't think he has a conceptual model of how any of this works. It was fascinating to me growing up, if you gave him a budget for buying a computer he could spec out the best "bang for your buck" knowing 8GB RAM > 4GB RAM and a 1Gig HD is > 500 MB HD without actually understanding what the components were. He was never interested in that level of detail, just show him how to click and do it.


My parents had never owned a computer before. My first PC came with an empty HDD, and somebody gave me a DOS boot disk. It was weeks before we tracked somebody down to install a copy of Windows on it.

I'll never be sure how many trials and errors I had before I could do something, but eventually I figured some things out.

Definitely would have been faster with somebody showing me. I probably would have been about 6 or 7.

Watching my 7 year old fumbling around with Scratch makes me think it's not as rare or amazing as it seems. He gets better all the time.


My 2 year old can grab our iPad, ask us to unlock it, and proceed to open Netflix or Disney plus (depending on his mood) and pick what show he was looking to watch. We taught him basic signs before he could speak (milkies, more, all done)

He’s not a savant by any stretch of the imagination. Kids are quite capable at very young ages. Parents are usually the ones holding kids back.

I make my 8-year old struggle and work when she asks for help. She gets mad, but I can see her actually learning how to learn. She also is not a savant, just a normal 8-year old.


Is it normal for 2-year-olds to watch television?


Lmgtfy

https://kidshealth.org/en/parents/screentime-baby-todd.html#....

Edit: looking at your post history you have a pattern of making shitty one-sentence comments. Why even bother? You come across as a troll.


OK, thank you.


People tend to really underestimate children and it really deprives so many of them of their potential.


You’re a rare parent who will let their kid struggle a bit because that’s how they learn


Some middle ground between just blindly following instructions and just getting stuck without making any progress before giving up would be ideal. Spending some time critically thinking and trying a few options but then getting guidance when all the obvious options have been explored.


You're a rare parent who doesn't think their first kid is some kind of future genius.


At 6/7 I was typing in BASIC programs for my VIC-20 out of the book which isn't much different to working with a command line. I don't think I was exceptional, there just wasn't much else to do in the 80s.


That's pretty much it.

So many kids learned to type some commands on a Commodore 64. There wasn't an iPhone to steal their attention.


Around 8 I was copying the example programs from the GW-BASIC manual (especially the ones that involved graphics) on an MS-DOS 3.1 computer, then I was randomly modifying them to see what would happen... not exactly sure how I ended up learning how to program, but at 10 I was able to do simple programs in BASIC.

I think that learning in an environment without a GUI was in the end very helpful. Of course in the beginning it was quite difficult, but very gratifying when I got something right.


At 7 I was typing programs from the book of around 100 basic examples on Atari 800xl and making derivatives. It would help if someone told me back than what a subroutine is.


Hi Vasa,

Hope you are having a great Tuesday and hope all is well! My name is flerchin, I am a technical recruiter for Amazon Web Services (AWS) and am hiring for Software Engineers looking for 100% fully remote roles. I’m reaching out because your experience and development background intrigued me and are in line with what we are looking for to help continue to build AWS. Especially your recent work would complement the AWS teams here and I know they would be interested in speaking to you.


I can't tell if this is satire.


Vasa is the 7 year old's name :)


I know that, and I still can't tell.


Every LinkedIn recruiter, ever :)


Kids are mostly being "dumbed" in school not educated. E.g.:

"Squeak Etoys, Children & Learning", Alan Kay

> The projects developed in Squeak use a different and simpler kind of incremental mathematics that allows very young children to understand some of the key ideas in calculus. We have found that more than 90% of 5th graders not only understand “Galilean gravity” but are able to derive the mathematical “formulas” (actually 2nd order differential equations) using this alternative mathematics, and author a simulation that matches up very well with the experimental data.

http://www.vpri.org/pdf/rn2005001_learning.pdf

(Also, something about infants and sign language... And László Polgár and his three daughters, whom he raised to be chess prodigies...)

We are barely scratching the surface of human potential...


Depends on the 7 year old. I was 7 when I saw a Unix system for the first time, a Tandy Model 16 running Xenix. I used the 'learn' command to learn how to operate the shell and its commands. The way 'learn' works is, it presents a lesson, and then has you apply that lesson in a fake shell environment. When you achieve the goals it sets forth, it deems you ready to move on to the next lesson.

I got around at a basic level with that knowledge, learning how to copy, rename, delete files, etc. and create new ones with 'ed' or 'vi'. Just enough to be dangerous, as they say. It wasn't until a few years later that I understood pipes, filters, redirection,and how to write my own commands in shell or C.


I think it's pretty cool Vasa was up after 10pm learning cool stuff with his dad.

Recently got my daughter into doing web application testing. She found four bugs in an hour. Trying stuff that I never thought of. I've created a monster. (She's getting paid, don't worry)


Don't teach him 'sudo' just yet :D

sudo papa buy me a lego set


Lolz, he knows how to get that without sudo already :)


My son can’t touch type yet

He might not be able to touch type, but now he can type touch.


Great, then logically the next step obviously is learning Vim


You mean emacs :)


You mean nano ;)


It's ed or it's nothing


I'm sorry guys, it will be vim :)


You mean emacs with evil-mode, right?


Or dd

Put each byte where it belongs


This is the best answer... as toggle switches as input truly sucks!


A lot of them, probably.

That's about the age where I learned programming (with AmigaBASIC). At that point, I did already know a bunch of CLI commands, too.

Kids can very easily get immersed into something. They also have a lot of free time.


This is not quite surprising as I experienced a few times that kids understand pretty well a CLI rather than a GUI. As soon as they can read the concept of a REPL is rather straightforward for many so called computer "illiterates". Say something to the computer through writing it on the keyboard then wait for the processing of it and finally see the result displayed on the screen. Plus the history of commands is also very intuitive. Is it because it's all based on natural language faculties that we all possess as soon as we are born?


I’m 71 and can’t learn any. Typing cryptic commands? I could learn but would forget by the next day. Had the first 128k Mac. Why backslide?


I have the exact opposite problem. Once I spend an hour figuring out a work flow, I can throw it in a shell script or alias it. How do I replicate that preservation of effort in a gui?


you can usually type "man command" or command --help and bring up a guide. you can also write up a cheat sheet in your bashrc or somewhere else convenient for whatever you are documenting. its like any other piece of info, either rehearse it until its baked in or write it down somewhere you can reference it again.


Thanks.


"can't"


Very wholesome post! My three year old likes to play “work” (simulating what I do while working). He asks me to give instructions like click this menu then click this button then type this letter then that… look that says your name!


I presume we're using a very liberal definition of the word "learn" here; I couldn't even memorize these commands when I was 10, I reckon if you quizzed them again in a week they'd have forgotten all about it.


I still have my times tables memorized decades later. Frequent use is the key, if the parent regularly engages with their child in this way I expect they'd remember them for years.


My six year old can quote parts of her books she's read exactly once, six to twelve months ago. She's not special in that regard. You'd be surprised at just how much information a kid can memorize - it's the on-demand recall that tends to be more hit and miss, and I'd suggest that's more to do with the sheer amount of new stuff they have on hand all the time. Hard to query the index as it's being rebuilt.

But give the kid the right context cues, and they can take off running. My daughter knows Bash. She always stares blankly at the first minute, but with someone able to get her started, she'll be back to writing her CYOA game in about five minutes.


Learning isn’t really about memorization


The term "muscle memory" is apt. I've been typing shell commands for 40+ years now. VIM commands for the last 30. They are as natural as brushing one's teeth. I learned them when young and never forgot.


Please locate the git commit that fails this test without googling.


git bisect start [last working commit] [earliest broken commit]

git bisect good/bad

E: I mixed the commits up. The irony


Knowing the exact syntax of git bisect isn't that useful when you use it quite rarely. Knowing that git bisect exists and that it does what you need is the real knowledge.


I got a laugh from this about tar https://xkcd.com/1168/


just let your toddler to save some porn in that dirs and you'll see if he needs your help in the next time.


I was exposed to such thing. The daughter of one of my exes, 13, was thrown at a face by a "teacher", raw IPv4 configuration with NAT *bsd/linux commands (no IP, no networking lectures, nothing), and the follow-up test asked her to do exactly that from a completely deconfigured network interface (if I recall properly). If among the parents' children there is someone competent, this teacher is going to get in trouble: because she was hopeless (stress, etc) and I would not expect otherwise.

"Kobayashi Maru" of teaching?


I don't understand what you mean by "was thrown at a face"


I knew a handful of DOS commands at the age of 3 (late 1980s). My father was smart enough not to include “del” among those.


Next post by author will be how one should wait before teaching the rm command to kids, and to always have a backup of all valuable files.


Are people still using raw "rm" and not aliasing to "trash-put"?

People should start making their shells act like in the 2000's and not 1990.

I only use raw "rm" when I need to delete a large folder that should not go in the trash bin.

In fact distros should start caring for user friendliness and even ask to do that on installation.

A system with no trash bin is what, before Windows 95?


> Are people still using raw "rm" and not aliasing to "trash-put"?

as a regular user of rm for decades without any issue whatsoever this reads like parody.

I understand it probably isn't, and I understand the logic behind the design choices that are prevalent in a modern OS..

but some of us just want the machine to do what it's told the first time, and we're competent and confident enough with our holstered foot-guns that we're not a major threat to any system that is being administrated properly.

>In fact distros should start caring for user friendliness and even ask to do that on installation.

I felt a great disturbance in the Force, as if millions of scripts suddenly cried out in terror and were suddenly silenced. I fear something terrible has happened.


> as a regular user of rm for decades without any issue whatsoever this reads like parody.

Sure, for someone riding a horse for decades, a bicycle may look like a parody but people should look for more convenient methods.

> we're competent and confident enough with our holstered foot-guns that we're not a major threat to any system that is being administrated properly.

This is more like a parody that you should realize how many people are losing data over simple wrong "rm" everyday as apparently average people aren't as competent as you're with decades of experience.

Desktop Linux also has a trash bin like anyone would expect. Not sure why this is not the case on the command line.

Yes, aliasing rm to trash-put may screw bunch of scripts but that doesn't mean people should find out about trash-cli after they've lost data. Smart scripts should not rely on aliases but use a clean environment or specify a full path to a command as well.

It could act as trash-put when used interactively or how come rm itself can't evolve over POSIX when rm is one of the easiest way to screw yourself with no confirmation by default.


I've never once used `trash-put`, but thanks for introducing it to me. Personally I've never found the concept of a temporary storage area for files I want to delete to be helpful. Even on Windows I would Shift-Delete files to skip the step of having to review it later. And in most cases I would just empty the Recycle Bin without checking.

The thing is that many Linux commands can wreck your system if you're not careful: a wrong `dd` or `mkfs`, removing a core package and its dependencies, a wrong change in `/boot`, etc.

I've definitely lost work because of this, but it always served as a learning experience, and I was more careful next time. I don't think I'd want to use a system with training wheels, not even when I was learning. The whole idea of Unix is giving full control to the user, and respecting them enough to allow them to make mistakes. If I didn't want that I'd be using a more restrictive OS.

BTW, a good middle ground between raw `rm` and `trash-put` is `alias rm='rm -i'`. This way you can confirm deletions or pass `-f` to force it.


> `alias rm='rm -i'`

Done that 15 years ago.

Ended up using -f because the confirmation got annoying fast.

Landed onto using trash-cli and never had to bother anything when rm'ing.

You can add 'trash-empty 30' in daily cron to delete files older than 30 days in the trash.


> this reads like parody

people try to coin terms and initiate trends all the time. it's no 'thats so fetch' but its not that bad. I'd never use it personally and have never heard of this type of lunacy but to each their own.


> Windows 95

Deletion confirmations are more important in GUI systems like Window's file explorer, where accidentally deleting a selected file would otherwise be a single mistaken keypress away. The delete key is easy to accidentally press. Your cat could even do it for you. Using rm requires a lot more effort, so I don't find a confirmation necessary.


Ever run 'rm' from shell history with Ctrl-r with a quick muscle memory and next moment the file was gone?

A cat needs to step on up arrow and enter to repeat a command as well.


Honestly I can't say I have. I usually keep removals and other hazardous commands out of my shell history by prepending them with a space character. And, if the command is coming out of my shell history, probably the file is already gone anyway (I also never use rm with relative paths, it just seems like a bad idea. Entering the full path is part of my confirmation process.)

But supposing all the stars aligned against me and my cat re-ran a removal from my shell history that actually referred to a file that existed still, I think that's a significantly less likely scenario than accidentally pressing delete in a GUI file explorer. Selecting files in a file explorer is a very common operation. And something is selected, the confirmations are the only thing standing between you and a single keypress disaster.

You know what commands scares me more than rm? cp and mv. Both of those can overwrite files, effectively deleting them. When I use rm at least my mind is already on the topic of file removal. (And yes, I know about -i, but who has time for that... I tried using aliases with -i once and disabled it the first time it inconvenienced me. Besides, I don't want to rely on a crutch that might not be there when I really need it.)

I've mostly moved away from all of this anyway, and primarily use dired and ranger.


I think even better is alaising del to trash-put and rm to rm -i. This trains me to use del normally, so if I'm on a system that doesn't have my alias I won't accidently really delete something.

It saves me, usually in minor ways, a few times a year.


I do one step further and just don't use rm much at all. If I have a terminal open, it's probably because I got it from the right click menu in the file manager, and I can just click over probably faster than I could rm, and I don't really care to practice for hours to maybe get fast enough to save a few seconds.

If I were to alias rm to something safer, I would probably get used to it, and over time start being less careful on the rare occasions I do use it.

Then I'd SSH into some system that didn't have the alias, and screw myself over.

rm should ideally have trashed stuff instead from the start, but since it doesn't, I think it's best to forevermore treat it as a dangerous command, unless all major distros switch.


I use raw rm. I just double check what the name of the file is before pressing enter. I've deleted something I shouldn't have maybe once or twice in the past ten years.

When I'm about to delete something with wildcard expansion, I'll first `ls` the wildcard expansion and glance over the results to make sure I'm not deleting anything I don't want to delete.


Those are all jokes asking for trouble.

Glad you've diligently followed that rule for over 10 years but think of average users.

It's also very possible that you actually want the file back later even though you thought you didn't need it then.


Personally I trash files much more frequently by accidentally redirecting output into them than by rm'ing them.

The real saviour is git.


I have never heard of the trash command. I learned unix from stackoverflow etc. and this was never mentioned as the first option eventhough it makes a lot of sense now that i read it


Indeed I was expecting things to go wrong as soon as the rm command was introduced.


Haha I hope it won't be, I haven't shown him `cd` yet.


Kids are absolute sponges. I've got my three year old using a dozen or so different tools based on need (different screw drivers, wrenches aka spanners, and sockets). Actual tools that adults use, not the playset plastic variety. It's wild.


Just an interested question. What need does a 3 year old have for adult tools?


I have her out there changing my oil every 7k miles. She's small. Can shimmy under there without using jacks. It's aces.

In all seriousness - use of physical tools teaches a myriad of skills. Just a few; hand-eye coordination, problem solving, visual spacial recognition. Children's toy brands like Melissa & Doug sell a wide variety of sets for development of these and other skills. Her using my tools is additional parental involvement and interaction, bonding time. Nothing but positives.


I'm actually not surprised at all by this, because I was born in the early 90s. We got a Windows 98 computer when I was about 5, and I used to play DOS games on it all the time which had to be booted up by rebooting into DOS mode.


Linux commands? Bash/tcsh/zsh commands!

There is no such a thing as "Linux command"!


Aside from echo, the commands taught weren't builtins. If you want to be nitpicky, you could call them ‘coreutils commands’.


That's amazing progress for one hour — congratulations!

> He goes on another spree of rm <something>

I cant be the only one who was waiting for him to try `rm -rf /`, can I? ;) Seriously, though, give him his own account asap!


Thank you sir! Somehow I didn't think it was time for his own account, but hey, why not, I will give him a proper sandbox. I won't add him to sudoers file though :)


Thats about as many as I learned in my 60+ years. I received lifetime immunity against CLI during my time with VAX VMS and its storage room of reference foliants.


One command appreciated by 7-yr olds is : touch poo


Hilarious!!!


this seems to me like a male equivalent of "8 year old girls in beauty pagents", honestly... At that tender cognitive age, the terminal is not the reality..


First-- hyperbole. Spending an hour with your dad tinkering with a terminal prompt is hardly the same as preparing for and entering a beauty pageant.

My 8 year old doesn't sit at the terminal, but he sure likes going to Scratch and editing the computer games there... sometimes writing his own, but usually just finding amusing ways to cheat or make existing games do weird things.

I wish it was a little easier to get into the "under the hood" stuff for kids. A whole lot of kids can do it and would enjoy it, but there's too many things with shallower learning curves in computers competing for attention.

As far as "tender cognitive age"--- not everyone picks up the mental models and procedural thinking needed to be a decent programmer. A little bit of early exposure probably makes this more likely. Of course, too much of anything is bad.


> My 8 year old doesn't sit at the terminal

the title of this article, that I commented on, is literally "How many Linux commands can a 7 year old learn?"


> the title of this article, that I commented on, is literally "How many Linux commands can a 7 year old learn?"

Did you just willfully skip everything I said to focus on this?

The article is about a kid who spent an hour, once, with his dad experimenting with a terminal. He's interested and curious and probably wants to do it again.

I told you that my 8 year old doesn't sit at a terminal, but has spent a fair bit more than an hour doing a somewhat similar computing task. He's also hyper-social and well adapted dealing with other living beings.


I certainly didn't intend to sound that way! When my son asked me about the terminal, I didn't have an idea whether 2 minutes later he'll say "Dad this is boring" or I would have to pull him into bed an hour later because next day was a school day. It just turned out to be the second one and I felt the story was interesting enough to share it.


he wants to do it because he sees you do it.. that can cut both ways. At that age, play and engagement with living beings is the priority, right? not Disney or Dad's work?

in an age of overwhelming signals, too much is too much, completely agree.. there is no ambiguity, children and teens are overstimulated with synthetic signals, and emotional health is suffering for it


But why?

There are more important things out there to teach to a 7 year old kid. Later, the kid can learn much faster, more important commands than simple 'ls' stuff.

Life skills, math, sports and stuff like that are much more important and fun, compared to these simple commands.


If you always prioritize learning the "important" stuff, it's gonna suck the joy out of your life and your kid's life.

Kids learn by imitating. If they see you learning the terminal, they ask you how to use it. The right thing to do is to show them.


This basically explains how I began. My parents had DOS and Windows 3.11 machines and I wanted to get at the games. Eventually the games became boring and I explored the OS and other programs. This eventually turned into an IT career (after a decade or so of additional unimportant stuff).


Because being able to use a computer to general purpose compute is helpful all over life. It's not a separate skill, its a tool. If you like math and sports you can use code to quickly run analytics on arbitrary data. Maybe you win the march madness bracket among your friends this year as a result or you start tracking interesting info on your personal skills. Maybe you can use some custom software to help you speed through a homework assignment in school, or you can opt to make some software and sell it on the side instead of flipping burgers for part time work while in school. Maybe you like cooking, now with programming you can write a scraper to collect recipes from these js heavy websites and store them into a local database not prone to bit rot. All people should be budgeting, and knowing how to code means you can easily roll your own budgeting software without having to deal with fees or the lack of features tailored to your own purposes from big commercial software. If you decide to run a small business, now you can handle your own web development, you can rope in services to run a storefront or track business analytics. maybe you are into gardening, now you can program a raspberry pi to water your plants for you whenever the soil starts to dry out or the weather calls for a lack of rain or some hot weather in the future.

programming is a tool that you can apply to just about every facet of life and output any number of posibilities. Not having learned it earlier is my biggest regret. imo knowing how to program and really understand how a computer works should be seen as the reading and writing of our modern age. computer literacy is low in this world and that's dangerous, but i think the reason for this is people just don't often get exposed to programming unless they want to seek it out themselves. it's rare to have parents who know how to code or even schools that offer classes in coding, much less require it like english.


Every time someone asks me why, I reply with why not? I simply saw that he was interested in somewhat strange appearance on a screen and that led to our "learning" (fun, really) session.

Of course I'm aware that math, soft skills etc. are probably going to be more important to him than `bash`, and I try to show him a bit of those too! But that doesn't mean that showing him something unusual when there's already an interest from his side is useless.


I know! I'm so glad I didn't learn anything unimportant as a kid. My brain would have become all full up and it'd be too full to learn the important things later on.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: