0154-0155.html

来自「linux-unix130.linux.and.unix.ebooks130 l」· HTML 代码 · 共 327 行

HTML
327
字号
<HTML>



<HEAD>

<TITLE>Linux Complete Command Reference:User Commands:EarthWeb Inc.-</TITLE>

</HEAD>

<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<SCRIPT>
<!--
function displayWindow(url, width, height) {
        var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>

 -->




<!-- ISBN=0672311046 //-->

<!-- TITLE=Linux Complete Command Reference//-->

<!-- AUTHOR=Red Hat//-->

<!-- PUBLISHER=Macmillan Computer Publishing//-->

<!-- IMPRINT=Sams//-->

<!-- CHAPTER=01 //-->

<!-- PAGES=0001-0736 //-->

<!-- UNASSIGNED1 //-->

<!-- UNASSIGNED2 //-->



<P><CENTER>

<a href="0152-0153.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0156-0157.html">Next</A></CENTER></P>







<A NAME="PAGENUM-154"><P>Page 154</P></A>



<TABLE>



<TR><TD>

macdef name

</TD><TD>

Define a macro. This token functions like the

ftp macdef command functions. A macro is defined with the specified name; its contents begin with the next line and continue until a null

line (consecutive newline characters) is encountered. If a macro named

init is defined, it is automatically executed as the last step in the auto-login process.

</TD></TR></TABLE>



<P><B>

ENVIRONMENT

</B></P>



<P>ftp utilizes the following environment variables:

</P>



<TABLE>



<TR><TD>

HOME

</TD><TD>

For default location of a file, if one exists

</TD></TR><TR><TD>

SHELL

</TD><TD>

For default shell

</TD></TR></TABLE>



<P><B>

SEE ALSO

</B></P>



<P>ftpd(8)

</P>



<P><B>

HISTORY

</B></P>



<P>The ftp command appeared in BSD 4.2.

</P>



<P><B>

BUGS

</B></P>



<P>Correct execution of many commands depends upon proper behavior by the remote server.

</P>



<P>An error in the treatment of carriage returns in the BSD 4.2 ASCII-mode transfer code has been corrected. This

correction may result in incorrect transfers of binary files to and from BSD 4.2 servers using the ASCII type. Avoid this problem

by using the binary image type.

</P>



<P>BSD 4.2, 30 July 1991

</P>



<H3><A NAME="ch01_ 77">

fuser

</A></H3>



<P>fuser&#151;Identify processes using files

</P>



<P><B>

SYNOPSIS

</B></P>



<!-- CODE SNIP //-->

<PRE>

fuser [_a|_s][_signal][_kmuv] filename ... [_][_signal][_kmuv] filename ...

fuser [_l]

</PRE>

<!-- END CODE SNIP //-->



<P><B>

DESCRIPTION

</B></P>



<P>fuser displays the PIDs of processes using the specified files or file systems. In the default display mode, each filename

is followed by a letter denoting the type of access:

</P>



<TABLE>



<TR><TD>

c

</TD><TD>

Current directory.

</TD></TR><TR><TD>

e

</TD><TD>

Executable being run.

</TD></TR><TR><TD>

f

</TD><TD>

Open file. f is omitted in default display mode.

</TD></TR><TR><TD>

r

</TD><TD>

Root directory.

</TD></TR><TR><TD>

m

</TD><TD>

mmap'ed file or shared library.

</TD></TR></TABLE>



<P>fuser returns a nonzero return code if none of the specified files is accessed or in case of a fatal error. If at least one access

has been found, fuser returns zero.

</P>



<P><B>

OPTIONS

</B></P>



<TABLE>



<TR><TD>

_a

</TD><TD>

Show all files specified on the command line. By default, only files that are accessed by at least one

process are shown.

</TD></TR><TR><TD>

_k

</TD><TD>

Kill processes accessing the file. Unless changed with

-signal, SIGKILL is sent. A fuser process never

kills itself, but may kill other fuser processes.

</TD></TR></TABLE>



<A NAME="PAGENUM-155"><P>Page 155</P></A>



<TABLE>



<TR><TD>

u

</TD><TD>

List all known signal names.

</TD></TR><TR><TD>

_m

</TD><TD>

filename specifies a file on a mounted file system or a block device that is mounted. All processes

accessing files on that file system are listed. If a directory file is specified, it is automatically changed to

filename/. to use any file system that might be mounted on that directory.

</TD></TR><TR><TD>

_s

</TD><TD>

Silent operation. _a, _u, and _v are ignored in this mode.

</TD></TR><TR><TD>

_signal

</TD><TD>

Use the specified signal instead of

SIGKILL when killing processes. Signals can be specified either by

name (for example, _HUP) or by number (for example,

_1).

</TD></TR><TR><TD>

_u

</TD><TD>

Append the username of the process owner to each PID.

</TD></TR><TR><TD>

_v

</TD><TD>

Verbose mode. Processes are shown in a

ps-like style. The fields PID, USER, and COMMAND are similar to

ps. ACCESS shows how the process accesses the file.

</TD></TR><TR><TD>

_

</TD><TD>

Reset all options and set the signal back to

SIGKILL.

</TD></TR></TABLE>



<P><B>

FILES

</B></P>



<TABLE>



<TR><TD>

/proc

</TD><TD>

Location of the proc file system

</TD></TR></TABLE>



<P><B>

EXAMPLES

</B></P>



<P>fuser -km /home kills all processes accessing the file system

/home in any way.

</P>



<P>In this example:

</P>



<!-- CODE SNIP //-->

<PRE>

if fuser -s /dev/ttyS1; then :; else something

</PRE>

<!-- END CODE SNIP //-->



<P>fi invokes something if no other process is using

/dev/ttyS1.

</P>



<P><B>

RESTRICTIONS

</B></P>



<P>Processes accessing the same file or filesystem several times in the same way are only shown once.

</P>



<P><B>

AUTHOR

</B></P>



<P>Werner Almesberger

(&lt;almesber@di.epfl.ch&gt;U)

</P>



<P><B>

SEE ALSO

</B></P>



<P>kill(1), killall(1), ps(1), kill(2)

</P>



<P>Linux, 11 October 1994

</P>



<H3><A NAME="ch01_ 78">

g++

</A></H3>



<P>g++&#151;GNU project C++ Compiler

</P>



<P><B>

SYNOPSIS

</B></P>



<!-- CODE SNIP //-->

<PRE>

g++ [ option | filename ]. ..

</PRE>

<!-- END CODE SNIP //-->



<P><B>

DESCRIPTION

</B></P>



<P>The C and C++ compilers are integrated; g++ is a script to call

gcc with options to recognize C++. gcc processes input

files through one or more of four stages: preprocessing, compilation, assembly, and linking. This man page contains

full descriptions for only C++ specific aspects of the compiler, though it also contains summaries of some

general-purpose options. For a fuller explanation of the compiler, see

gcc(1).

</P>



<P>C++ source files use one of the suffixes .C,

.cc, .cxx, .cpp, or .c++; preprocessed C++ files use the suffix

.ii.

</P>



<P><B>

OPTIONS

</B></P>



<P>There are many command-line options, including options to control details of optimization, warnings, and code

generation, which are common to both gcc and g++. For full information on all options, see

gcc(1).

</P>







<P><CENTER>

<a href="0152-0153.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0156-0157.html">Next</A></CENTER></P>







</td>
</tr>
</table>

<!-- begin footer information -->







</body></html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?