Unix common command profile (6)

xiaoxiao2021-03-06  39

30) HISTORY

=======

? Set the length of the command record table

======================

Perform format set history = n

EXAMPLE:

% set history = 40

Set the length of the command record table (40 commands that can be recorded)

? View the contents of the command record

======================

Perform format History

? Use the command record table

================

Perform format!!

EXAMPLE:% !! (Relative Execution Previous Command)

Perform format! N (n is the command number of the command record)

EXAMPLE:%! 5 (execute the fifth command in the command record)

Perform format! String (overhead of String is a command for the starting font)

EXAMPLE:%! CAT (Reproduction of Cat as the starting character of Cat)

Example:%! Cat (Relative Front Permits CAT for the Start Briting Bright Bright Bright Bright Bright)

======================

Perform format !! P

? Change the content of the previous command and execute

============================

Perform format ^ ildstring ^ Newstring

Change part of OldString in the previous order into newstring and execute

EXAMPLE:

% Find. -name file1.c -print

^ file1.c ^ core

% Find. -Name Core -Print

Note The files generated by the system when an error or command is wrong, as a debug, which is generally deleted because of its space.

31) Compression of information

==========

In order to avoid uncommon files or materials occupy too large disk space, please use the user to compress the compression

Archives or in front of the file, it can be restored to the original data type, wherever the compressed process

This is a compressed file that is attached to the ".z" after the file name.

? Compression information

==========

Perform format Compress FileName to compress file

Perform format compressdir directory-name Compression Directory

Unzip reduced information

================

Perform format UNCOMPRESS FILENAME Anti-compression file

Perform format UNCOMPRESSDIR DIRECTORY-NAME Anti-compression Directory

Pipe-line use

================

Perform format Command1 | Command2

Send the Command1 execution result to Command2 as a Command2 input

EXAMPLE:

% ls -rl | more

List the name of all files and subdirectories in the current directory in paging mode

% Cat File1 | More

List the contents of file file1 in paging mode

32) I / O Control

===========

• Standard input control

================

Perform format Command-Line

Use File as the input of Command-Line

EXAMPLE:

% mail -s "mail test" user@isis.sinica.edu.tw

Will file file1 when doing the contents of the letter Subject name as Mail Test, give the recipient

? Control of standard output

================

Perform format Command> FileName

Send the execution result of the Command to the specified filename

EXAMPLE:% ls -l> list

Write the result of the "LS -L" command to write into the file list

Perform format Command>! Filename

I have forced OverWrite if the files of FileName have existed.

EXAMPLE:% ls -lg>! List

The result of the "LS - LG" command will be executed to write into the file list

Perform format Command> & FileName

Write any message generated on the screen when chand is executed in the specified filename

EXAMPLE:% cc file1.c> & error

Write the file to compile the file1.c file to write archive error

Perform format Command >> FileName

Execute the Command's results Addition (Append) to the specified filename

EXAMPLE:% LS - LAG >> LIST

The result of the "LS - LAG" command is added to the file list

Perform format Command >> & filename

Any message generated on the screen when chand is executed in the specified filename

EXAMPLE:% cc file2.c >> & Error

Any information generated by the screen when compiling file2.c files is attached to the archive error

33) View users in the system

===================

Perform format who or finger

Perform format W

Perform format finger username or finger username @ domainname

Change your own username to enter the other user's account with its rights

============================================================================================================================================================================================================= ======= Perform format SU Username

EXAMPLE:

% SU User enters the user account

Passwrod: Enter the user's password

34) View Username

==============

Perform format who am i to view login to your own username

Perform format Whoami View Current UserName If the "SU" command is executed (Switch User)

Show this USER Username

See the user of all workstations in the current class:

================================

Perform format: RUSERS

=> End

Talk to the user on a workstation:

=========================

Perform format: Talk username @ hostname or talk username @ ip_address

EXAMPLE:

1. You can use the RUSERS directive to view the user on the network.

2. Suppose your account is U84987 to use the workstation Indian now want to be on DOC

U84123 conversation

% TALK U84123 @ DOC ==> At this time, the waiting screen will appear on the screen.

The following messages will appear on the other party (U84123) screen

Message from talk_daemon @ local_host_name at xx: xx

Talk: Connection Requested by U84987 @ Indian

Talk: Respond with: Talk U84987 @ Indian

At this point, the other party (U84123) must perform TALK U84987 @ Indian to talk to each other

Finally

end

35) Check if the remote computer system is normal

=========================

Perform format ping hostname or ping ip-address

EXAMPLE:

% ping doc

36) Introduction to the use of email (e-mail)

==========================

The E-mail address of this department is Ice.ntnu.edu.Tw. Send the file as the content of E-mail

==============================

Perform format mail -s "subject-string" username @ address

% mail -s "program" user

Send file.c to user, Subject Name is Program

Transfer E-mail to this user

=========================

Perform format mail username

% Mail User

Transfer E-mail to the field

====================

Perform format mail username @ receivediver-address

EXAMPLE

% mail paul@gate.sinica.edu.tw

Subject: Mail Test

:

Type a letter content

:

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

New Post(0)