Simple Unixy mistakes that will ruin your day
#1
Since it's expected that most everyone here is using a Unix or Linux, and there seem to be a lot of users new to the idiom here, I thought it would be nice to have a thread of pitfalls to be aware of.  Experienced users have all been down this road many times.  If you have one or more to contribute, please do.

I'll start with one I ran into recently.  It caused a several-day headache.  Firefox was randomly crashing, and the only thing that would remedy it was to kill ypbind, a rather odd situation.  This was caused by a simple oversight on my part.  In /etc/nsswitch.conf I had the line

Code:
hosts:        files nis dns
where I should have had
Code:
hosts:        files dns nis

I've written a pretty extensive web server, but I've never written a web browser, and can only guess why this is relevant.  So I won't propose a possible explanation.
  Reply
#2
Another thing is re-direction. Some people mis-type the output file and wonder why their root file system is full;
Code:
# MiscCommand >/dev/nul
Note that it really "/dev/null" with 2 el's.



Next is the dreaded mis-identification of devices. With Pinebook Pro, their are 2 MMC devices, the internal eMMC and the Micro SD card. In most Linux kernels they show up with the same prefix, but different unit numbers, That's because they use the same driver, "mmcblk". However, getting the unit number wrong for writing could lead to over-writing your working OS.
--
Arwen Evenstar
Princess of Rivendale
  Reply
#3
My personal biggest mistake is not double checking the command before hitting "return".



I've accidentally done
Code:
rm -R / intended-dir
and the like, just enough times to be now ever mindful of it.

For some reason when I type fast, I insert spaces and mix up . / and space.
  Reply
#4
(12-20-2020, 08:33 PM)KC9UDX Wrote: My personal biggest mistake is not double checking the command before hitting "return".



I've accidentally done
Code:
rm -R / intended-dir
and the like, just enough times to be now ever mindful of it.

For some reason when I type fast, I insert spaces and mix up . / and space.

You haven't lived until you've done a
"rm -rf /*.*"
Makes your day so much fun..
  Reply
#5
Isn't it funny how that's always the time when the system just refuses to respond to Ctrl-C?
  Reply
#6
Here's one:

Typo on the dd command where you accidentally use 'of=/' where you mean to use 'if=/' overwriting your entire root directory

dd is one to be careful with! Wink
- RTP

"In the beginner's mind there are many possibilities, in the expert's mind there are few." -Shunryu Suzuki


[ Pinephone Original | Pinetab v1 / v2 Enjoyer ]


Linux Device Privacy / Security Playlist



  Reply
#7
Tongue 
(01-29-2021, 03:00 PM)RTP Wrote: Here's one:

Typo on the dd command where you accidentally use 'of=/' where you mean to use 'if=/' overwriting your entire root directory

dd is one to be careful with! Wink

Please don't even mention that again, I still softly cry myself to sleep over that one.
  Reply
#8
Linux adheres to the Unix Philosophy - it gives the user enough rope to hang himself. Always remember, it will do what you tell it to do, not what you want it to do! Smile
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Advice on building a simple computer… SeeMossRun 4 4,258 05-24-2021, 05:25 PM
Last Post: barray

Forum Jump:


Users browsing this thread: 1 Guest(s)