- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: List of common mistakes
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-27-2010 03:16 AM
тАО10-27-2010 03:16 AM
Re: List of common mistakes
This is going to fail because is is going to try deleting the current directory mercury.
>MK: Remember that every directory has two special sub-directory entries: "." and "..".
>This command will delete /home/sun/moon/*.*, which includes:
/home/sun/moon/.. = /home/sun/
/home/sun/moon/../.. = /home
/home/sun/moon/../../.. = /
Huh?
>And when "rm -rf" deletes a directory, it will also delete all files and sub-directories in it.
Yes, in it, but not the recursively to all ancestors.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-27-2010 05:46 AM
тАО10-27-2010 05:46 AM
Re: List of common mistakes
I issued the following command in lab server;
# hostname monster
and forgotten it , somebody call me that GUI manager application sayas no more OR valid license and logon with telnet and found my mistake:
# hostname
monster
I corrected it
# hotname
my problem I created solved
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-27-2010 09:45 AM
тАО10-27-2010 09:45 AM
Re: List of common mistakes
>This is going to fail because is is going to try deleting the current directory mercury.
By Unix conventions, a directory is just a file (although a special type of one).
A file can be deleted while it's still open: if that's done, the file will keep existing (but it will be unreachable using any filename) as long as it's held open. As soon it's closed, it will be deleted for real.
This is true for all files, including directories.
----------
>> #/home/sun/moon/mercury/> rm -rf ../*.*
>> [...will lead to total destruction]
> Huh?
> [...] but not the recursively to all ancestors.
After a bit of thinking, I see you're correct. It will delete ../.. = /home/sun/moon, but not farther than that.
Consider me humbled, and my "rm -rf" paranoia brought back to sensible (but still sensibly paranoid) levels :)
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-27-2010 10:51 AM
тАО10-27-2010 10:51 AM
Re: List of common mistakes
#/home/sun/moon/mercury/> rm -rf ../*
I agree with MK. It delete current dir (mercury) also.
And,
#/home/sun/moon/mercury/> rm -rf ../*.*
Delete the files and dirs which have a dot symbol and under moon directory.(My prev post)
But it can't delete the hidden files in moon dir(which starts with a dot, like ".abc"
Also rm -rf * cannot delete the dot(.) and double dots(..) which are indicating current dir and parent dir.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-27-2010 12:00 PM
тАО10-27-2010 12:00 PM
Re: List of common mistakes
The most common mistake seen here in the forums is first doing anything as root even if you are absolutely not sure what you are doing (e.g. disk replacements in complex LVM structures), then ask how to solve the self-created serious problem.
PEBKAC.
Better first ask, read, confirm, then do.
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-27-2010 01:10 PM
тАО10-27-2010 01:10 PM
Re: List of common mistakes
Do you mean fully qualified domain name with
#hostname
For example:
#hostname monster.abc.com
Right ??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-27-2010 01:46 PM
тАО10-27-2010 01:46 PM
Re: List of common mistakes
Its just hostname of server
#hostname server_name
This one is correct.
Regards
Vishnu Khandare
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-27-2010 02:46 PM
тАО10-27-2010 02:46 PM
Re: List of common mistakes
Know thy host name.
I was just asked today what my most embarrassing mistake was in systems administration.
That was while supposedly vetting a patch set in the sandbox, actually installing it in production with reboot during business hours.
Things like that happen more often than you imagine.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-27-2010 03:32 PM
тАО10-27-2010 03:32 PM
Re: List of common mistakes
Also few good points:
1. Be careful about the right click , when you are using putty session(s):
It can paste all the buffer contents with a wrong right click, and can damage if you have root session open.
One example: one fine morning we found that none of the LVM commands are working. Like vgdisplay , lvdisplay , lvcreate nothing works and giving error. After reviewing we found that all the files are 0 byte.
Later found by mistake pasting of ">" character did the damage.
2. Take system config backup before any activity ,like reboot, or upgrade or scheduled maintenance or hardware upgrade :
If the config data taken prior the activity the verification would be easy after the system is backup up, and eliminates confusions. There are many scripts sysinfo, infoc , nickel collector etc are available that can quickly collect system info before any activity.
3. Track/preserver historical filesystem config data to resolve problem quickly:
Suppose you got a ticket that /var is 95% in your server.
If you have bdf output , archived offsite, %, you can easily track how much it was earlier before it is 95% , so you can take an action quickly. And troubleshooting flowchart would be simple.
- If it was earlier just 94% , so you will know only 1% increased and you will try to reduce 1% or 2% only.
- Suppose If it was 60% earlier, then you will think oh something really filled up the file system, and the hunt for large files will begin,
- Sometime application or backup/restore restores something by mistake on root or vg00 filesystems, so that can also be tracked.
for now these three ,
Enjoy, Have fun!,
Raj.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-27-2010 08:15 PM
тАО10-27-2010 08:15 PM
Re: List of common mistakes
2) Panicking when something goes wrong and rushing to try to fix something when you don't know the real problem. (Management standing over your shoulder and asking 'When will it be fixed?' can be a big cause!)
3) Not reading complete error messages.
4) Not using support when there's a problem. You likely pay HP, or someone, for support. Use it. That's why you pay them.