A few years ago I had a very functional linux from scratch machine built. I had Xfce up and running as well as all of my applications. I was installing the proprietary AIM client and went to clean up after the installation when I did this:
The chmod one is good - the chown one is also good (for different reasons)
I remember a few years ago (I wasn't a sysadmin) I noticed the passwd file had 666 permissions (how appropriate). Only my honesty prevented me changing my uid to 0 (honest).
Everyone's done the rm -rf one, surely!
(it was a long time ago, but went something like this (fortunately at home)..)
I don't ever remember doing that twice! As root, if I did it now, I'd just clear my desk and leave my badge at the front desk on the way out!
A few years ago I made a chown -R mistake. I found out that the hard way that chown -R user:group .* (the solaris version anyway) will see .. as part of the recursion and change ownership of all files and directories (and everything in them) one level above the directory you are in. I did this in my home directory on the NFS server that shared them out. I ended up owning everyones files...
Another mistake I have made is getting distracted and doing shutdown -i6 -y -g0 on a server instead of my workstation. I consider myself lucky to have never screwed up a production machine bad enough to get me in trouble. My advice to anyone reading this trying to get their foot in the door and get a UNIX job is to download a free UNIX and make your mistakes at home. I also recommend aliasing commands like rm -rf to rm -rif. Especially for root.
On Linux it's pretty simple to do killall commandname instead of killing things by pid all the time, but it can be a dangerous habit to get into. This command exists on Solaris and, I think, several other flavors, but has a completely different and absolutely literal meaning. It needs no arguments.
---------- Post updated at 03:06 PM ---------- Previous update was at 02:57 PM ----------
Quote:
Originally Posted by ilikecows
A few years ago I made a chown -R mistake. I found out that the hard way that chown -R user:group .* (the solaris version anyway) will see .. as part of the recursion and change ownership of all files and directories (and everything in them) one level above the directory you are in. I did this in my home directory on the NFS server that shared them out. I ended up owning everyones files...
It's smart enough to reject "." and so not loop forever through the same directory, but nobody thought to reject "..". How odd.
/dev/null doesn't work that way. You cannot move files into something that's not a directory. And if ~/* turns out to be one file, it will still complain that you cannot remove /dev/null to replace it unless you're root.
That said, replacing /dev/null with an ordinary file might mess up any number of things...
I made some changes to inittab on a "new" Solaris Netra and the server wouldn't boot (obviously I typed something wrong!). I spent the last I'm-too-embarrased-to-say-how-many hours fixing it!
Hi all,
I'm new to UNIX world and new to this forum. As I observed there are lot of commands that needs to be remembered in UNIX programming. I'm into DevOps and can anyone please tell me what are all the important commands that are useful for DevOps Engineer.
NOTE: Please correct me if my... (3 Replies)
Hi All
I have found that few basic commands in unix have the same syntax in linux as well. I need those commands which differ on Linux platform, with some more advanced options..
For example... awk, sed, tr ... and some more commands with advanced options. I am trying to search on the linux... (1 Reply)
I have many files with info about soft, installed on remote machines.
I need to compare this file with template (soft than must be installed) and output file must content info about software that's not installed.
template.txt
software_name1
software_name2
software_name3.1
... (14 Replies)
I'm working on further developing my Unix skills and I'm just curious what some of the experienced admins out there would consider to be 10 essential commands every admin should know. (12 Replies)
This is my first time using this forum. My question is simple. I need a book that has the commands code for Linux, if there is such a book, of course.
Thank you (1 Reply)
hi, can i have a unix like environment where i can do things like chmod, shell scripts and etc.. in redhat instead of the GUI that redhat ofters? (4 Replies)
I want to know if there is a way to send unix commands thru FTP from a mainframe to kick off Autosys Jobs. I just need to send a command from the mainframe to UNIX and have UNIX execute that command. (2 Replies)