CMD List [4]

本文介绍了AIX操作系统中常用的命令及其用法,包括查看命令手册(man)、创建目录(mkdir)、查看文件(more)、移动文件(mv)、更改密码(passwd)等。这些命令对于日常管理和维护AIX系统至关重要。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1.1         man

 

Displays the reference manual page about a AIX command. (man can use in DB UAT Server, similar command like whatis,apropos)

 

Syntax             man [-] [-k keywords] topic

 

Option or argument

Function

-

If your system usually presents manual pages one screen at a time, this option displays them without stopping – useful in redirecting the output of man to a file or to the printer.

-k keywords

Specifies one or more keywords to search for. You see all man pages that contain the keyword(s) in their header lines.

Topic

Specifies the topic you want information about.

 

To print a manual page, type man ls | lp

 

Samples:

 

 You forgot the options that you can use with the ls command, so type

 

man ls

 

To save this information for later perusal or inclusion in a user’s manual you’re writing for your department, type

 

man ls > ls.info

 

1.2         mkdir

 

Creates a new directory.

 

Syntax             mkdir directory

 

Option or argument

Function

Director

Specifies the name of the new directory. If the name doesn’t begin with a slash, the new directory is created as s subdirectory of the current working directory. If the name begins with a slash, the name defines the path from the root directory to the new directory.

 

You must have permission to write in a directory to create a subdirectory in it. For the most part, you should create directories in your own home directory or subdirectories of it.

 

1.3         more

Viewing larger files. Relate: cat.

 

1.4         mv

 

Renames a file or moves it from one directory to another.

 

Syntax             mv [-i] oldname newname

  or

         mv [-i] filename directory[/newname]

 

 

Option or argument

Function

-I

Tells mv to prompt you before it replaces an existing file with a moved or renamed file.

Oldname

Specifies the existing file you want to rename.

Newname

Specifies the new name to use for the file.

Filename

Specifies the file that you want to move.

Directory

Specifies the directory to which you want to move the file.

 

1.5         passwd

changes login password

1.6         pr

writes a file as report to standard output.

 

1.7         ps

 

Displays information about your processes(jobs).

 

Syntax             ps [-a] [-l] [-u] [x]

 

Option or argument

Function

-a

Displays information about all processes. If you omit this option, you see only your processes.

-e

Writes all processes, except kernel processes.

-f

Generates a full listing.

-l

Displays a longer, more-detailed version.

-T

Displays the process hierarchy rooted at a given pid in a tree format

-u

Displays a user-oriented report with additional information.

x

Displays all processes that are running in the background and not using a terminal.

      

       Status Value

Option or argument

Function

R

Running

S

Sleeping (20 seconds or less)

I

Idle (more than 20 seconds)

T

Stopped

 

e.g.

       ps -ef|grep …; ps -T <process number>; ps –eU <user name>

       ps -ef | grep 'startMatnJobQ.sh' &

 

1.8         put

ftp to remote host. Refer get.

Syntax             put xxx, put path1\xxx, put path1\xxx path2\xxx

1.9         pwd

Show current path.

 

1.10     read

Reads one line from standard input.

 

Option or argument

Function

-r

Specifies that the read command treat a \ (backslash) character as part of the input line, not as a control character.

 

e.g.

while read -r xx yy

do

         print printf "%s %s/n" $yy $xx

done < InputFile

 

1.11     rm

 

Deletes (removes) a file permanently.

 

Syntax             rm [-i] [-r] filenames

 

Option or argument

Function

-i

Asks you to confirm that you want to delete each file.

-r

Deletes an entire directory and the files it contains. Watch out – you can do great deal of damage with this option! Always use the –i option.

Filename

Specifies the file(s) or folders to delete.

-f

Does not prompt before removing a write-protected file.

 

e.g. in Shell: rm -f ${INFILEPATH}/wsd_bcebe_m1.bin

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值