(Reproduced) HP-UX system maintenance basic command and common configuration file

xiaoxiao2021-03-05  21

Note: Transfer from CHINAUNIX

Original: http://bbs.chinaunix.net/forum/8/050409/527573.html

System maintenance common configuration file 1. / etc / hosts host name resolution file, provide the host name and IP address. 2. / etc / passwd password file, the content is: Login User Name: Encryption Password: User ID: Group ID: Reserved: Initial Work Directory: SHELL Path 3. / etc / group content is: Group Name: Encryption Password: Group ID: All users belonging to this group. 4. / etc / profile If the file exists, the file will be executed each user. This file is generally used to set some universal environment variables, if there is a .profile file in the user's Home directory, then execute the user's .profile file after executing / etc / profile. 5. After the / etc / initTab is initialized, the system will start the / etc / init of the DEAMON process, enabling the / etc / init process to get the control of the boot sequence. The init process acquires an indication from file / etc / inittab (initial, initialization table), which controls all init statistics while also controlling the regeneration of those have worked. 6. The information of the file system that can mount in the / ETC / FSTAB system. 7. / etc / lvmtab User Command: # strings / etc / lvmtab; view system VG and disk information. 8. /etc/rc.config.d/netconf contains system names and network configuration information, such as IP addresses, subnet masks, and routing information. 9. / Stand / System contains the system's drivers and subsystem information, kernel device information, and some system adjustable parameter information. System Maintenance Basic Command 1) TAIL and HEAD Use the tail command to view the end of the file, the head command views the head of the file. # Tail FileName # tail -f filename; make Tail continue to display the new row of the file when the file is written. #head filename

2) Date and Cal cal commands Display the calendar. # CAL 2000 # CAL 1 2000 3) The Find Find command is one of the strongest commands, but it is also one of the most difficult commands that the command line structure is most difficult. # Find / -Print | WC -L Displays the number of all files and directories in the system. # Find / -user $ logname -print Displays all files and directories in the system. # Find / -size 100 -Print Display File size is 100 blocks. # Find / -size -100 -print Displays the file size less than 100 blocks. #find / -size 100 -print display file size is greater than 100 blocks. # Find / -name core -exec rm {} /; look up and delete the core file. # Find. -exec chown $ logname {} /; modify the user belonging to all files in a directory. # Find.-type d -exec chmod 770 {} /; modify all directories in a directory. 4) stty This command is used to check and modify the communication parameters of the user's current registration terminal. # stty -a; check the communication parameters of the current registered terminal. # stty-ixon; Set ixon is OFF. #stty ixon; Set ixon is ON. # stty sane; When the terminal is chaotic, it can usually produce a beneficial effect. 5) TSET is used to set the terminal type. Tset -s -q -m ':? HP' 6) Cron Cron (Chronography, time), wake up every minute, check the control file to determine if there is a job that should be run, and there is to run. # crontab filename; create a cron # crontab -r; remove the cron from cron to crontab under directory / var / spool / cron / crontabs, each user's Cron file name is its username. 7) ioscan #ioscan -fn (with this command, we can see all the devices and their device files.

), For example: View CD-ROM device file #ioscan -fncdisk class IH / w path driver s / w state h / w type description ====================== ======================================================= Disk 6 4.8. 0 sdisk CLAIMED DEVICE SEAGATE ST34371W / dev / dsk / c0t8d0 / dev / rdsk / c0t8d0 disk 7 4.11.0 sdisk CLAIMED DEVICE SEAGATE ST34371W / dev / dsk / c0t11d0 / dev / rdsk / c0t11d0 disk 5 16 / 5.2.0 sdisk CLAIMED DEVICE TOSHIBA CD-ROM XM-5401TA / DEV / DSK / C3T2D0 / DEV / RDSK / C3T2D0 http://www.uxma.com/sheke/news/pic/8.swf which is described as "Toshiba CD-ROM XM-5401TA" The device is the CD-ROM, the device file is / DEV / DSK / C3T2D0. 8) BDF This command is used to check the usage of the file system. #BDF FileSystem Kbytes Used Avail% Used Mounted ON / DEV / VG00 / LVOL1 67733 35561 25398 58% / / DEV / VG01 / LVOL1 20480 11675 8247 59% / Home All Collections: FileSystem: File System Name KBYTES: bytes Used in K unit Used: Use space Avail: Can still use space% USED: The use of space accounts for all spatial ratios of this file system. MOUNTED ON: Installation Directory Note: When you reach more than 90%, you should consider making the necessary file cleaning work 9) Lanscan Use the lanscan command to view the network card in the host. For example: # lanscan hardware station crd HDW Net-Interface NM Mac HP-DLPI DLPI PATH Address In # 10/4/8 0x00108318E6E8 0 UP LAN0 SNAP0 1 Ether Yes 119 10/6 0x0060B0C44462 1 UP LAN1 SNAP1 2 Ether YES 119 The above command shows that there are 3 network cards in the host, and their related parameters are as follows: Hardware addresses are 10/4/8, 10/4/12 (Hardware Path) network card name is LAN0, LAN1 (NET- Interface Name List) NMID of each NIC is 1, 2 (nmid) The working status of each NIC is UP, DOWN, UP (HDW State Column) The MAC address of each network card is the column corresponding to the station address. A network card must be able to work normally, first of all, its working state must be UP. Use the ifconfig command to view the IP address corresponding to the NIC.

For example: # ifconfig lan0 lan0: flags = 863 inet 15.85.114.14 Netmask fffff800 Broadcast 15.85.119.255 The address on the NIC LAN0 is 15.85.114.14 (inet), subnet mask FFF800 broadcast address 15.85.119.255 10) ifconfig # ifconfig lan0 lan0: flags = 863 inet 15.85.114.14 netmask fffff800 broadcast 15.85.119.255 lan0 address on the card is 15.85.114.14 (inet ), Subnet mask FFF800, broadcast address 15.85.119.255 11) Changing host IP address 1. First use the "Lanscan" and "ifconfig" command to detect the device name of the network card 2. Edit /etc/rc.config using the vi command .d / netconf file. Find interface_name [0] = lan1 ip_address [0] = "" Subnet_Mask [0] = "" Broadcast_address [0] = "" change the original IP address and SUBNET_MASK to a new value 3. Edit / etc / hosts using the VI command / etc / hosts File, change the IP address corresponding to the host name 4. Note: Do not change the IP address directly in the CDE environment, to exit the CDE environment, complete the modification process. Http://www.uxma.com/sheke/news/pic/8.swf is described as "Toshiba CD-ROM XM-5401TA" is the CD-ROM, the device file is / DEV / DSK / C3T2D0. 8) BDF This command is used to check the usage of the file system. #BDF FileSystem Kbytes Used Avail% Used Mounted ON / DEV / VG00 / LVOL1 67733 35561 25398 58% / / DEV / VG01 / LVOL1 20480 11675 8247 59% / Home All Collections: FileSystem: File System Name KBYTES: bytes Used in K unit Used: Use space Avail: Can still use space% USED: The use of space accounts for all spatial ratios of this file system. MOUNTED ON: Installation Directory Note: When you reach more than 90%, you should consider making the necessary file cleaning work 9) Lanscan Use the lanscan command to view the network card in the host.

转载请注明原文地址:https://www.9cbs.com/read-37078.html

New Post(0)