您的位置:首页 > 运维架构 > Linux

Linux command

2016-06-21 12:27 337 查看
check memory :

top

free -m

vmstat -s

SYNOPSIS

mail [-dEIinv] [-a header] [-b bcc-addr] [-c cc-addr] [-s subject] to-addr …

mail [-dEIiNnv] -f [file]

mail [-dEIiNnv] [-u user]

DESCRIPTION

mail is an intelligent mail processing system which has a command syntax reminiscent of ed(1) with lines replaced by messages.

The options are as follows:

-a      Specify additional header fields on the command line such as "X-Loop: foo@bar" etc.  You have to use quotes if the string contains spaces.  This argument may be specified more than once,
the headers will then be concatenated.

-b bcc-addr
Send blind carbon copies to bcc-addr.

-c cc-addr
Send carbon copies to list of users.  cc-addr should be a comma separated list of names.

-d      Causes mail to output all sorts of information useful for debugging mail.

-E      Don't send messages with an empty body.

-f      Use an alternate mailbox.  Defaults to the user's mbox if no file is specified.  When quit, mail writes undeleted messages back to this file.

-I      Forces mail to run in interactive mode, even when input is not a terminal.  In particular, the special ~ command character, used when sending mail, is only available interactively.

-i      Ignore tty interrupt signals.  This is particularly useful when using mail on noisy phone lines.

-N      Inhibits initial display of message headers when reading mail or editing a mail folder.

-n      Inhibits reading /etc/mail.rc upon startup.

-s subject
Specify subject on command line (only the first argument after the -s flag is used as a subject; be careful to quote subjects containing spaces).

-u user
Equivalent to:

$ mail -f /var/mail/user

except that locking is done.

-v      Verbose mode.  The details of delivery are displayed on the user's terminal.


方法一:

/sbin/ifconfig -a|grep inet|grep -v 127.0.0.1|grep -v inet6|awk ‘{print $2}’|tr -d “addr:”

or

/sbin/ifconfig|sed -n ‘/inet addr/s/^[^:]:([0-9.]{7,15}) ./\1/p’

方法二:

local_host=”
hostname --fqdn


local_ip=
host $local_host 2>/dev/null | awk '{print $NF}'


方法三:

local_host=”
hostname --fqdn


nslookup -sil $local_host 2>/dev/null | grep Address: | sed ‘1d’ | sed ‘s/Address://g’
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  linux