# What are your favored * excruciating * Unix minutes

Just how around sharing your favored lessons found out minutes?

0
2019-05-06 23:47:31
Source Share

I was as soon as attempting to zero out a USB thumbdrive making use of dd.

Obviously, when tty1 began spewing out ReiserFS mistakes from my origin partition, I needed to re-install ...

0
2019-12-02 00:56:17
Source
git init
git clean -f


This does not remove the database. This gets rid of every little thing that is not in the database.

After attempting to remove the existing repo and afterwards start resource control once more (on the finished first variation of a task), these 2 commands obliterated my whole code.

0
2019-12-02 00:53:33
Source

Installing Debian (with net - install) on a computer system and also become aware after restarting that I had actually in some way missed the component where one is intended to pick which plans to install.

Certain, a non - visual system with primarily just pwd, ls and also cd is functioning simply great ;).

0
2019-12-02 00:50:47
Source

Debian dist-upgrade to unpredictable (or was it screening?) on a remote manufacturing web server.

Overlooked advising concerning libc changing to nptl strings.

Not exactly sure where installation in fact fell short, yet I was entrusted one root console on a dial - up line with each and every single application taking off. Simply one running ssh and also bash.

Had a great deal of enjoyable of recouping it. Posted statically connected dpkg, curtailed libc, constructed a personalized kernel with RAID assistance. I assume that took about 3 hrs with my dial - up line. When I ultimately restarted it, fsck took like 10 mins. Fairly excruciating 10 mins I need to claim.

0
2019-12-02 00:50:41
Source

I did chown -R /usr. In some way, I assumed it was an excellent suggestion. Ultimately, a creature manuscript did some negative things, and also in some way I shed sudo civil liberties.

Our certified sysadmin had not been able to recoup my sudo civil liberties, and also I needed to re - photo the equipment.

0
2019-05-31 06:45:10
Source

As origin on Solaris,

$kill -9 1  ... and also every little thing dropped. My close friend obtained discharged as a result of this. 0 2019-05-21 09:07:45 Source Last year, a coworker of mine was making use of among our linux workstations to create duplicates of flash disks making use of the dd command. He mistakenly keyed in something comparable to the following: dd if=flash-image.img of=/dev/sda1  By the time he understood his blunder - overwriting the equipment is hard drive as opposed to the flash drive - the equipment was currently hosed. We needed to restore package, which by the way was additionally the equipment hosting every one of our growth VM goes to the moment ... 0 2019-05-21 09:05:09 Source There is a cool method to do the matching of dirname and also basename, specifically, in Bash: ${path%/*}
${path##*/}  Not so amusing when $path has a routing lower ...

0
2019-05-21 08:43:08
Source

My favorite minute was, when a carbon monoxide - employee, that is an emacs customer, intended to modify a vital documents.

Due to the fact that emacs is way too much to type he had arrangement a pen name for emacs:

alias em=emacs


Under the impact of not nearly enough or way too much coffee he certainly mis - keyed in em ...

Well, this is simply an additional factor to make use of vi ... ;)

0
2019-05-21 08:10:14
Source

Wanted to make an archive:

tar -cvzf mydir/* mydir.tar.gz


Of training course, mydir/* increased to mydir/myfile.cpp mydir/myfile.h

Remember that the archive name adheres to the -f alternative of tar!

0
2019-05-19 20:26:59
Source

My fave is when I was constructing the new Solaris system for an Oracle data source installment. Every little thing remained in area consisting of the high valued oracle professional right in the center of the DB optimization job he was doing. I remained in the web server area examining an additional web server, when I located the power cable to the web server.

0
2019-05-19 20:20:51
Source

1st ex-spouse staff member: How do I do (something unimportant)?
Second ex-spouse staff member: sudo rm -rf /
1st ex-spouse staff member: Haha ok
. .
. First ex-spouse staff member (Having neglected that he would certainly simply sudoed another thing, so it really did not request for his password once more): oh F * *K!!!

0
2019-05-19 18:51:45
Source

A while earlier, I required to do some considerable arrangement on among my equipments, that primarily entailed editing and enhancing number of documents in /etc. I determined to be actually mindful concerning it, so I developed an etc directory site in my $HOME, replicated the documents that required editing and enhancing therein, invested pair hrs doing the edits. I meticulously examined all the documents, saw to it that all the edits were specifically the means they were intended to be, visited as origin and also replicated the modified documents back to /etc. Already, it was really late during the night. Still as origin, I determined to clean up, and also as opposed to rm -rf etc, I key in rm -rf /etc. I did not get much rest that evening. 0 2019-05-19 18:20:22 Source I got on the phone with a coworker that was out at a consumer website. She was working with their systems and also I was informing her stroke for stroke what to type, she misheard me when I informed her rm -rf .??* and also keyed in rm -rf .?*. Yet she had not been in the directory site she had actually informed me, she remained in the origin directory site. Cleaned not just the dot documents, yet the whole OS. When I was "finding out as a sysadmin", I was creating my very own adduser manuscript (really did not have it on very early SysV). A shell mistake in the manuscript (cat /etc/passwd; echo ...) > /etc/passwd which certainly cleaned the passwd documents and afterwards, by crash, I struck Ctrl - D to exit the su shell. Needed to go in to the workplace at 1am Saturday early morning to get the boot diskettes. 0 2019-05-19 18:05:54 Source I do not track mistakes on my very own boxes, yet from the last 15 years below are my 2 job casualties: 1995 : Standard 'rm -rf as origin' failing on a solitary box (not my layout!) working as a mixed NIS master web server+single DNS web server for the firm+key SMTP/POP3 web server for the firm. It was SunOS 4.1.3 _ U1 as I remember. Unsurprisingly, like the witness to a horiffic criminal activity, I do not bear in mind the following 48 hrs. 1998 : Ran newfs (SunOS) on a manufacturing AFS (currently OpenAFS) documents web server as opposed to the substitute we were standing. Invest the mid-day and also evening recovering from tape. 0 2019-05-19 13:54:08 Source Many internet applications like magento or eZ Publish have a var/cache/ folder and also a means to clear the cache that is much faster than entering the application backend is to do this: rm -rf var/cache  After doing this a number of times, it is medically confirmed that you constantly wind up: • Either doing this in the origin of your web server ; or • Adding a / prior to var Lesson found out: create a pen name for this command with an outright course in it. 0 2019-05-18 10:41:31 Source My button from Debian to Ubuntu began the day I attempted to delete some documents and also directory sites, suggesting to type rm -r /var/tmp/*  Unfortunately, I put a room in between "/ var/tmp/" and also" *" and also also worse, I remained in the origin of the filesystem. [email protected]:/# rm -r /var/tmp/ *  Please do not attempt that in the house! 0 2019-05-16 23:23:51 Source In the computer system laboratories when I remained in university, they had a screen saver that substitute a number of rounds that would certainly float to and fro. They drew on each with substitute gravity. As soon as, while I was tampering the setups, it collapsed with the mistake Error: force on balls too great 0 2019-05-16 23:04:51 Source Somehow taken care of to unmount/ dev and also assumed I would certainly be screwed for life if I restarted the equipment. Nerve wrecking hr followed attempting to identify if it would certainly be secure to reboot it. It was, absolutely nothing negative took place. 0 2019-05-16 22:10:22 Source I mapped the CapsLock to ESC on the whole system. When I did it, the Capslock got on. A reboot got rid of the irreversible state of CapsLock. It was mapped to ESC It had not been actually excruciating yet I really felt foolish when I understood what I would certainly done! 0 2019-05-16 21:07:17 Source Mine was chmod -R 777 / : afterwards I could not identify just how to recover the approval overall filesystem and afterwards I re-installed the OS. Never ever did that once more (and also still do not recognize just how to recover such a scenario). 0 2019-05-12 07:48:43 Source This took place to me in 2014. I was getting rid of some documents from the web server making use of a short-lived variable: rm -rf${prefix}*


Guess what? The variable $prefix was not specified! You can visualize the calamity ... it caused some really essential documents removed. I virtually damaged the Control-C and also went to the CPU to remove the network wire!! Hahaha I'm certain a person had actually currently done this ... 0 2019-05-12 06:15:52 Source I wondered if chmod 000 / would certainly function. Well, faultlessly. A couple of mins later on I was looking for a rescue CD. 0 2019-05-12 06:10:42 Source I was a laboratory aide for a Linux class. Among the pupils called me over due to the fact that she can no more su - due to the fact that she was obtaining permission denied. OK, she's misremembered/mistyped the password. Restart right into solitary - customer setting and also reset. What?! su STILL does not function ?! It MUST acquiesce my will! So I reboot right into solitary customer setting to figure out what she did. I understood that she ran chmod -R 777 /var/www/html/drupal-6.19 / Note the room in between the directory site name and also the last lower. After a couple of mins of "I actually do not intend to have her reinstall, so what is this doing and also just how.", I took care of to locate that/ bin/su currently had documents permissions of 777. That can additionally read as documents permissions of 0777, which gets rid of the setuid little bit from /bin/su. A fast chmod u+s /bin/su and also I was a hero. 0 2019-05-12 06:07:25 Source The very first time I mounted GNU Linux on my desktop computer, I mounted Debian, no aid, I just mounted the standard system, no GUI. And also I resembled: " OMFG OMFG WHAT DO I HAVE TO DO NOW? ... I will certainly require to return to Windows " But after that I bore in mind just how to install plans ( very first time in GNU Linux, just a [email protected]:$ result and also just read some points from Debian ) and also the name of an IRC Client : IRSSI and also the name : GNOME and afterwards I mounted them ... because that day, I install IRSSI and also GNOME in every equipment ...

It really feels ... excellent trying out your computer system xD

0
2019-05-12 06:07:06
Source

First one

One time, I had actually specified a pen name to aid me tidy temperature documents :

alias clean_dir_tmp="find /tmp -maxdepth 1 -user **** | grep *** | xargs rm -rf"


and also certainly eventually, when I had neglect what the pen names was doing I mistyped :

clean_dir_tmp *  I assume I shed an excellent number of secs prior to I understood what was taking place ... : ( Second one I was functioning customarily with my Mac laptop computer and also my Ubuntu desktop computer. When I connected the exterior HD of the Mac (HFS+filesystem) in Ubuntu, I saw that the proprietor was ?????. My UID was various on my Mac and also on my desktop computer so given that I desired a better result with ls -l , I determined to transform that. So I changed the UID on the mac and also released a large chown -R * on the HD from Ubuntu. The only point that I really did not recognize was that the HFS+vehicle driver for Linux was not secure. To now, I have not had the ability to place this HD on Linux or my Mac once more ... 0 2019-05-10 19:06:30 Source Back in the mid to late 90s, a close friend of mine and also I were reviewing the recklessness of rm -rf * and also at what factor a Linux box would certainly fail. We got involved in statically connected versus dynamically connected collections and also I assumed that the system can live fairly well without /lib and afterwards continued to relabel it on my workstation. Negative points took place , yet we were entrusted numerous open console windows with which to attempt and also deal with the damages (closure had not been an alternative any longer). None of the editors would certainly run. It is impressive the heavy usages you can locate for the echo command. 0 2019-05-08 21:04:42 Source Makefile : clean: @rm -f * .o  Which, certainly, makes make clean clean your resource code as opposed to simply object documents. Lesson : usage variation control. 0 2019-05-08 20:52:41 Source I deleted /etc and then recovered it. I do not assume I discovered my lesson ... I've needed to recoup from a removed /bin also. Appears to take place when I've been collaborating with a chroot. 0 2019-05-08 20:45:50 Source A long period of time earlier, I was mounting MkLinux on my Mac, and also I intended to replace the documents that controlled command handling (not the covering, something extra standard, do not bear in mind fairly what any longer). The guidelines claimed to do mv x y, so I determined to be mindful and also began with rm y. The purpose was to mv x y after that, yet certainly that really did not function. I re-installed. 0 2019-05-08 20:19:44 Source Not actually my minute, yet somebody else's. When I operated at a nuclear sciences study center we made use of to run a variety of SunOS, Ultrix and also Linux computer systems and also scientists needed to share the CPU on those equipments. As specific study teams obtained their very own study gives they acquired their very own computer systems, primarily SparcStations and also they did the system management themselves. SunOS made use of to deliver with the OpenView desktop computer and also a wonderful documents supervisor, this is what it resembled : Most of our scientists were running as origin, and also greater than as soon as we needed to re-install their os due to the fact that a person had actually determined to clean - up the origin directory site and also relocated/ container,/ etc,/ tmp and also every little thing else that littered the sight right into either the Trashcan or some subfolder. Various other customers picked to clean the/ container directory site and also remove any kind of command they did not recognize. The fortunate ones had back ups, the majority of had actually acquired a disk drive, yet did not have a practice of running back-ups themselves. 0 2019-05-08 19:35:54 Source Had a close friend run :() { :|:&}; : on a remote web server where we really did not have console accessibility to. Could not reboot it, entirely iced up, manufacturing web server . Separated (by demand) to make it a little bit extra legible. :() # Define ':' as a function. Every time we say ':' execute the following code block { # Start of code block : # Call ':' again. | # Pipe output to... : # Another ':' & # Disown process. # All on one line this would read :|:&, } # End of code block ; # End definition of ':' as a function : # Call ':'  It could be less complicated to consider it as bomb() { bomb|bomb& }; bomb  0 2019-05-08 19:29:50 Source When I first began functioning as a customer professional for the college I was participating in, I was offered minimal sudo civil liberties to aid pupils that had actually lost/forgotten their passwords. sudo passwd <username> was my new close friend. A hr after my alignment, my inquisitiveness overcame me and also I key in sudo passwd and also looked in scary at the punctual for a new password. I was a little bit terrified to ^C my escape of it, assuming (erroniously, it ends up) that I could leave the account concerned in a short-term state, so I got in a password and also quickly strolled upstairs to the solemn 2nd flooring domain name of the university SuperUser and also asked if he would love to recognize the origin password of the major system. 0 2019-05-08 19:27:52 Source Trying to get the Xwindows vehicle driver for my Nvidia card functioning when Fedora originally launched the Nouveau vehicle driver. I had actually downloaded and install the Nvidia resource to compile and also install myself as I had sometimes in the past, yet this release, I can simply not get it to function. There were plenty of actions to locate in the Fedora Forums to entirely disable the Nouveau vehicle driver, and also get the Nvidia vehicle driver working. Fairly excruciating to claim the least. 0 2019-05-08 19:27:18 Source Or an additional experience, just how to really feel actually foolish in a couple of very easy actions that do not appear all that foolish independently. Tip one : develop a make up the child, in instance he intends to make use of a Linux box. Offer it an unimportant password, given that nevertheless this is a residence system and also isn't revealed to the net. Tip 2 : permit time to expire, so you do not bear in mind action one. Tip 3 : open the SSH port in the firewall program (in fact the NAT on the router) in order to ssh in. Nevertheless, my accounts have respectable passwords, and also it isn't like there's anything enormously beneficial. Tip 4 : get alert from ISP that there's some type of DOS task mosting likely to a Swedish website. Think it's possibly the Windows boxes, and also check out and also set them. Tip 5 : get alert from ISP that it's still taking place. Request for some information, get IP address of Swedish website, fire up Wireshark, locate which box the strike is originating from. Tip 6 : clean up Linux box, really feeling foolish. Locate the login originated from a Romanian address. Remove accounts without excellent passwords. 0 2019-05-08 15:17:13 Source chown nobody:nobody /*  . As origin certainly 0 2019-05-08 13:28:03 Source I was as soon as creating a tool vehicle driver for Unix. It had a reminder trouble and also throughout testing it began to cross out completion of an array in kernel memory. I was slow-moving to detect this and also really did not strike the reset switch quickly. The vehicle driver had actually jotted throughout the disk barrier cache which was after that purged to disk prior to I struck reset. A great deal of the blocks were inodes and also directory sites, and also I wound up with an entirely trashed filesystem. I assume 6000 orphaned documents were taken into lost+found prior to I surrendered and also re-installed. The good news is, this was just an examination system, not my workstation with all my documents on it. 0 2019-05-08 13:19:32 Source On a Debian installment back in 1999. 14 floppies for the standard installment. I attempted to get xfree86 working. Yet X really did not start. I needed to figure out the setups of my graphics card (memory, straight and also upright refresh price), which was entirely undocumented. It ended up superprobe figured out the proper quantity of inner graphics card memory (1024 kB). Yet it took me virtually a week to figure out that the resolution setup (1024x768) really did not function. I needed to change it to 640x480 till the graphics card ultimately functioned (at 1024x768 ... buuuuuug.). I attempted to get the serial port computer mouse to work with COM1. So I attempted to get the computer mouse to function. Reviewing a publication (at that time I had no useful high - rate net), I attempted with /dev/ttys0  And also it really did not function and also really did not function. It took me virtually an additional week to figure out this was due to the fact that I required to type the S is uppercase, not lowercase ... /dev/ttyS0  It had to do with after that when I ultimately understood what 'instance - delicate' actually suggests. 0 2019-05-08 12:57:08 Source Not that excruciating ... But an enjoyable little minute : I've mistyped ls as sl and also figured out that the sysadmin had actually something mounted for such instance. (currently readily available in Debian, Ubuntu, Gentoo, ... databases) 0 2019-05-08 12:29:41 Source Surprised no one else has actually stated this set yet : rm -rf .*  (While trying to remove all concealed documents and also subdirectories, entirely neglecting that it will certainly recurse right into . and also ..) 0 2019-05-08 12:26:18 Source I suggested well, I actually did. Attempting to chmod recursively a directory site and also wound up exchanging ./ with /. As origin certainly, due to the fact that just with origin can real discomfort (and also hence knowledge) be attained. 0 2019-05-08 12:23:28 Source I had actually 2 drives mounted at one factor and also had the origin filesystem of the 2nd drive placed in a directory site within /mnt. I remained in that directory site and also attempted to delete var yet wound up keying rm -rf /var rather. Some reaction appeared to start that claimed var has to be come before with a lower! When I knew what I would certainly done I quickly struck Ctrl-C yet it was far too late. My rpm data source had actually time out of mind left the structure. I invested ages obtaining every little thing back to regular. Currently for the excruciating component. I return right into that directory site in /mnt to resume what I would certainly been doing. What do I type? Well, allow's simply claim that reaction started once more. At the very least I had the ability to recover the system a whole lot quicker the 2nd time ;) 0 2019-05-08 12:21:39 Source When my University determined to switch over the cordless network to make use of exclusive Cisco LEAP verification ... Started a long fight that finished all right. Wrote documents for others that intended to run Linux and also have accessibility to the net. 6 months later on they determined to add PEAP assistance too. face put It is my favored due to the fact that I won. I obtained it to function. 0 2019-05-08 11:01:39 Source rm -f * ~  . and also rm -rf{DIR}/

.

when DIR was not set!

0
2019-05-08 09:57:16
Source

A straightforward halt identifying some secs later on that I'm out a neighborhood covering and also having no opportunity to power on the manufacturing web server once more.

Lessons found out? The punctual of the equipment currently resembles

[ --> root <-- @kompost:/home/echox] #

with some wonderful red markup ;-)

0
2019-05-08 01:30:03
Source

Twenty mins earlier, I was fastidiously recreating an intricate directory site framework from documents I carried my various other PC. I determined to run du to see if it was near conclusion. Offered the dimension, I recognized it would certainly take couple of mins, so went to get some coffee.

On my return I saw, to my extreme discouragement, that as opposed to running

du -hs /path/to/important/folder


rm -r  /path/to/important/folder

0
2019-05-07 23:57:45
Source

vi and also Caps-Lock vs. /etc/passwd

1. Connect to an old Solaris box making use of an old serial terminal that does not rejuvenate the screen appropriately.
2. su -
3. vi /etc/passwd. There is no vipw, and also "we're simply making small edits" anyways.
4. Struck Caps-Lock key and also do not see.
5. Struck j a pair times to scroll down. Overlook the reality that you in fact simply keyed in J (" Join" ), which incorporates this line with the next line. The serial incurable screen was not revitalizing appropriately, so you really did not see that you simply incorporated the first 5 lines right into one Loooooong line, therefore damaging the first 5 customers (' origin', 'daemon', etc ).
6. Complete your OTHER planned edits to the documents, means down near the bottom.
7. Conserve documents.
8. Log out.

I did this as soon as. Extremely, the system continued to be useful for months. Cronjobs ran penalty, no mistakes attracted attention in the logfiles.

We really did not see this trouble till we restarted the system months later on and also could not visit at the console. ps revealed a number of work possessed by UID '0' not by customer 'origin'.

You can not visit as origin, neither run su or su -, and also there was no sudo on this box. There was no saggy drive, the CD-ROM was broken and also no USB ports (so no exterior CD-ROM ). Solitary customer setting did not function, due to the fact that you require to key in the password for origin, which originates from /etc/passwd.

0
2019-05-07 23:52:57
Source

While in my 2nd year of researching computer technology we were offered a research assignment to write a program in C that would certainly generate a variety of subprocesses with fork and also make them connect with pipelines in a "circle" and also identify which one need to be the "leader".

We were still fairly noobs at that time and also a lot of peple really did not have any kind of Linux equipments, so we worked with our accounts on our professors's major web server (which was organizing main website and also team accounts and also websites too ). A lot of individuals created forkbombs at some phase of attempting to do the research. Over fifty percent of my team reached the abusers documents. That was the highest possible load on that particular web server in a looong time : )

0
2019-05-07 23:48:19
Source

I cleaned the dividing table of my major drive by crash, assuming I was working with an additional drive.

With scrollback, mindful use df, memory, and also good luck I had the ability to recreate it specifically, revise it, reboot, and also hope ... And it functioned.

0
2019-05-07 21:50:40
Source

I bear in mind attempting to send a SysRq key series to a remote equipment ...

... yet it was recorded by the neighborhood one.

0
2019-05-07 21:49:18
Source

A firm that I made use of to benefit had its item working on SCO. I was doing some debugging concerning applications obtaining really slow-moving on our trial web server and also at the very same time there was a number of consumers being offered a demo/lecture concerning upcoming new attributes.

So, I ran the application that made use of to get stuck, did my things on it to validate the origin, yet given that it was still "stuck", I attempted to eliminate it :

pkill -9 mytestapplication


What I did find out was that pkill does not do specifically the very same on SCO as it does on linux = )

... It primarily eliminates every little thing the customer has accessibility to, and also with origin ... that's every little thing = )

0
2019-05-07 21:09:26
Source

Back in the day you needed to do get rid of the first 512 bytes of a dividing to effectively layout FAT drives from Linux. This is done making use of the dd command.

dd if=/dev/zero of=/dev/hda1 bs=512 count=1


Other than the FAT dividing was /dev/hdb1

I really did not understand what had actually taken place till after I restarted. The good news is I had the ability to recoup it by re-installing Lilo, or something.

0
2019-05-07 21:06:56
Source