The common command below Solaris 9i.

xiaoxiao2021-03-05  27

1) Increase User Group GroupAdd [-g GID] Group Description: g Let the ID number of the group, ID cannot and the ID number already existing, for example: #GroupAdd -g 100 Sun (add one ID number to 100 user groups for SUN 2) Increasing User UserAdd [-u Uid | -g Group | -d Dir | -s Shell | -c Comment | -M [-k Skel_Dir] Login Description: u Specifies the user ID number, G to formulate the group, D Specify the user directory, S Develop user shell, c users 'comments, m build user directory, login users' login, for example,: #useradd -u 1233 -g sun -d / export / home / sun -c "sun test user. "-M -

3) LS Usage - View all files include folders

-l detailed information on the document

-t is sorted by time

4) Find lookup file command

Find path - Name The file name to find -Print (there will be a lot of catalog in the actual use, because the user does not have permission to view this directory)

5) Copy command CP source address destination address (equivalent to copying in Windows)

MV source address destination address (equivalent to cut copy inside Windows)

6) Unix file format with DOS file format Interchange Unix2dos Oldfile NewFiledos2Unix Oldfile NewFile

7) View UNIX version number: uname -a

8) Delete file RM file name

Delete Folder RM -R folder name or RMDir folder name

9) Display the size of the file under the folder DU -D folder

10) Look at the remaining space of the disk DF -K or DF -T

11) Super user modification system time: Date MMDDHHMIDATE -U MMDDHMIYYYYYYYYYYYY

12) Super users modify the normal user password: passwd -d user1 // Delete the password of the user USER1

13) View the top 5 lines of the file, you can use the head command, such as: Head -5 / etc / passwd to view the files of the file, you can use the tail command, such as: tail -10 / etc / passwd you know how to view the middle One? You can use the sed command such as: SED-N '5, 10p' / etc / passwd

14) Create a file system newfs / dev / rdsk / c0t0s0d0

Repair file system fsck -y path

Redistribute file size Format

For example: steps of steps on a new hard drive are indicated.

15) Add a folder MKDIR folder name

Edit the text vi, check the text vi file name or CAT file name or more file name

16) Force interrupt one process Ctrl C

17) DF -K Displays the hard disk space occupied by the file system

18) Show current Row rating WHO -R

19) Restart Init 5 or Reboot

Turn off computer init 0 or shutdown or halt

20) Enter the content you need to enter into the file.

For example: CAT path> file name or CAT path >> file name (append to the end of the file)

21) Establish a connection (shortcuts in Windows) a) build hard connection LN source target (this connection copy delete source, the target can be used)

B) Establish a soft connection LN -S source target (this is the same as the shortcut in IndoW)

22) Viewing the file type File FileName You can find the file or other files or other. Similarly, LS -L can also be seen in the type of file.

23) Change the owner of the file Chown [-r] User: Group name file [clip] name

Change the properties of the file (such as only read, etc.) CHMOD A W file [clip] name, where A represents all users, W represents reading, indicates an increase in the later properties. If you want to edit the executable script in VI, you must use Chmod A X FileName after saving the file so that this file can be implemented. Adding -r means all subdirectories and subfiles that will be applied to the file.

24) Calculate the number of words in the text WC FileName

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

New Post(0)