Common AIX commands and VI usage

Source: Internet
Author: User

View basic machine configurations in prtconf
Vmstat View machine running status
PWD view current path
Errpt view error information
Historical commands used
Enter set-o vi (only once) and then
Press ESC and then K to call up History commands. Press K to call up History commands consecutively.
Sort by file size LS-L | sort-rn + 4
View the directory size: the unit of Du-sk dir is KB (kilobytes)
Ls-L: the object size is measured in bytes.
Ls-A: View hidden files
Du sees block (512 bytes)
What du-K sees is Kbytes
Run the following command to check the logical Volume LV information of the volume group VG:
 # Lsvg -L Vgname
1: crontab usage: crontab [-E |-L |-R] File Name-E: Edit task-L: Display task information-R: delete scheduled execution task information
2: files processed in crontab are in the format of minutes, hours, days, months, and weeks. * indicates that all conditions are 5 * REM/home/Oracle/execsql indicates that each hour is executed at 5 minutes/ home/Oracle/execsql File
Crontab command usage
Submit, edit, list, or remove cron jobs. Syntax
Crontab [-E [username] |-L [username] |-R [username] |-V [username] | file] Description
Example
Copy a file named mycronjobs to the/var/admn/cron/crontabs directory and enter the following content: crontab mycronjobs writes each hour to the console in the form of hours, and enter: 0 *** echo the hour is 'date '.
>/Dev/console should be at a.m. every Monday, Wednesday, and Friday. run the calendar command. Enter 30 6 **, 5/usr/bin/calendar to run the calendar command at every day of the year. Enter: 30 6 */usr/bin/calendar to run a script called maintenance at midnight every day on January 1, August, enter: 0 0*8 */u/Harry/bin/maintenance is the standard input definition Text of the command. Input: 0 16 *
12 5/usr/sbin/wall % Happy holiday! % Remember
Turn in your time card. After % (percent), define the standard input text of the wall command:
Happy holiday!
Remember to turn in your time card. file/var/adm/cron/FIFO when a new job is submitted by the crontab or at command, a named pipe that sends a message to the cron daemon.
/Var/spool/cron/crontabs specifies the crontab buffer pool area.
/Var/adm/cron. allow specifies the user list. These users are allowed to access the crontab command.
/Var/adm/cron. deny specifies the user list. These users are not allowed to access the crontab command.
Find/-name Java-print is used to find files or directories,/indicates to find from the root-name Java indicates that the search name is Java
On Aix, The chpasswd command is provided to modify user passwords in batches, which facilitates the compilation of non-interactive scripts.
When passwd is used on AIX to change the user password, the new password can only be read from the standard input, and cannot be redirected or coroutine, when there are a large number of user passwords that need to be modified, there is a large amount of repetitive labor. Our service migration just needs to migrate a large number of users, but the user passwords of different systems cannot be directly migrated due to encryption algorithm and strength issues, you can only reset the passwords of all users after the migration. In this case, it is especially important to modify the passwords of all users in batches.
Chpasswd can read information from the standard input or from the file through redirection. However, either method must comply with the following format:
 Username: Password
 Username: Password
 ...
In addition, the chpasswd on AIX also provides the capability to modify the user flag.

How to set the environment variables for each user? Root Java and zhzc Java Path Problem 78921
There is a. Profile hidden file in the home directory of each user. You can modify it.

Used to build lpar with software IVM But resource occupation is a management.
8008582621-2 Dell fan sales
Use the VI editor to enter the VI editing Environment
[
[Email = root @ server] root @ server [/Email]
Root] # vi [Press enter]
[
[Email = root @ server] root @ server [/Email]
Root] # vi file [Press enter]
Three States of VI:
Command mode: it is the initial and general method of VI. It is used to execute commands, but cannot input text content. Most of the commands are executed in this mode.
Insert mode: used for text content Input
Last-line command mode: used to execute disk saving commands, Exit commands, VI setting commands, etc.
Conversion of three working states:
From the command mode, you can enter the other two modes. The insert mode and the last-line command mode cannot be directly converted. The command mode serves as the intermediary.
ESC key, edit key (I or A or O),: key is the control key for Mode Conversion
(1) edit the text (entering the insert mode)
[ESC]-> A: add the text to the cursor
[ESC]-> I add text to the cursor
[ESC]-> O opens a new row under the row where the cursor is located
(2) withdraw from storage
[ESC]->: W [Press enter] to save and not exit
[ESC]-> ZZ indicates saving and exiting vi
[ESC]->: WQ [Press enter] to save and exit vi
[ESC]->: Q [Press enter] to exit vi
[ESC]->: Q! [Press enter] to force exit VI without saving
(3) move the cursor
[ESC]-> H (Batch)J (bytes)K (rows) L (→)
[ESC]-> $ move the cursor to the end of the row
[ESC]-> 0 move cursor to the beginning of the line
[ESC]-> move g cursor to the last line of the file
[ESC]-> move the 1g or Gg cursor to the first line of the file
[ESC]-> NG cursor moves to the specified n rows
[ESC]-> Ctrl + F flip the screen forward
[ESC]-> Ctrl + B flip back
(4) Delete
[ESC]-> XDelete the character at the cursor
[ESC]-> DW deletes a word
[ESC]-> DD: Delete the row where the cursor is located
[ESC]-> 5dd Delete 5 lines of text starting from the current row
(5) copy and paste
[ESC]-> YY copy the row where the cursor is located to the editing Buffer
[ESC]-> P: copy the edited buffer content to the row after the cursor
[ESC]-> 5yy copy the row starting from the start to the editing Buffer
(6) cancel the operation
[ESC]-> U cancels the last modification
(7) Last-line command
[ESC]->: Set
[ESC]->: set number displays the row number
[ESC]->: Set autoindent auto indent
[ESC]->: Set tabstop Tab key width
How does VI save the file name?
: W/pathto/Yourfile
Note: When the screen contains messy characters, you can use [ESC] to enter the command status and then press ^ + L to refresh the screen.
   You can use Ctrl + I to refresh the screen. If you are on a terminal, you can use Ctrl + R to refresh the screen.
When the system does not reflect the information on the screen, you can use Ctrl + Q to free up

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.