网站地图    收藏   

主页 > 系统 > linux系统 >

Linux命令汇总之a.*(一) - Linux操作系统:Ubuntu_Cen

来源:自学PHP网    时间:2015-04-14 10:17 作者: 阅读:

[导读] 博客主页:http: blog csdn net minna_d 1 a2p 将awk 脚本转化为perl 脚本命令转化后的结果并不一定可靠,需要人工干预 [root@jjy ~ q data hongkongAndMacaoPoint poi] cat awkTest sh ! bin b...

 

1. a2p 将awk 脚本转化为perl 脚本命令

转化后的结果并不一定可靠,需要人工干预.

 

[root@jjy ~/q/data/hongkongAndMacaoPoint/poi]# cat awkTest.sh
#!/bin/bash
echo $1
 awk '{for(i=0; i < NF; i++){ print $i}}' $1
[root@jjy ~/q/data/hongkongAndMacaoPoint/poi]# a2p -o  awkTest.sh perlTest.pl
Unrecognized character ' in file awkTest.sh line 3--ignoring.
Unrecognized character ' in file awkTest.sh line 3--ignoring.
#!/usr/bin/perl
eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
    if $running_under_some_shell;
			# this emulates #! processing on NIH machines.
			# (remove #! line above if indigestible)

eval '$'.$1.'$2;' while $ARGV[0] =~ /^([A-Za-z_0-9]+=)(.*)/ && shift;
			# process any FOO=bar switches

#!/bin/bash
$, = ' ';		# set output field separator
$\ = "\n";		# set output record separator

while (<>) {
    chomp;	# strip record separator
    @Fld = split(' ', $_, -1);
    print $_ if $echo . $Fld[(1)-1];
    if ($awk) {
	for ($i = 0; $i < ($#Fld+1); $i++) {
	    print $Fld[$i];
	}
    }
    print $_ if $Fld[(1)-1];
}

2. a2ping 图片、文档格式转化命令

 

[root@jjy ~/q/data/tmp_data]# a2ping --bboxfrom=compute-gs /notSolidHd/learing_document/shell12.pdf xx.eps

接受输入格式: PS (PostScript), EPS, PDF, PNG, JPEG, TIFF, PNM, BMP, GIF, LBM, XPM, PCX, TGA.

接受输出格式: EPS, PCL5, PDF, PDF1, PBM, PGM, PPM, PS, markedEPS, markedPS, PNG, XWD, BMP, TIFF, JPEG, GIF, XPM.

依赖于 sam2p 与 gs 命令

3. a2ps设置打印如何在打印页上显示文本或图形。

4.a2x 将asciidoc 文档转化为其它格式

A DocBook toolchain manager that translates an AsciiDoc text file SOURCE_FILE to PDF, EPUB, DVI, PS, LaTeX, XHTML (single page or chunked), man page, HTML Help or plain text formats using asciidoc(1) and other applications (see REQUISITES section). SOURCE_FILE can also be a DocBook file with an .xml extension

[root@jjy ~/q/data/tmp_data]# cat minimal-book.txt
= The Book Title

== The first chapter
Nec vitae mus fringilla eu vel pede sed pellentesque. Nascetur fugiat
nobis. Eu felis id mauris sollicitudin ut. Sem volutpat feugiat.
Ornare convallis urna vitae.

Nec mauris sed aliquam nam mauris dolor lorem imperdiet.

== The second chapter
Ut suspendisse nulla. Auctor felis facilisis. Rutrum vivamus nec
lectus porttitor dui dapibus eu ridiculus tempor sodales et. Sit a
cras. Id tellus cubilia erat.

Quisque nullam et. Blandit dui tempor. Posuere in elit diam egestas
sem vivamus vel ac.

转化为pdf格式
[root@jjy ~/q/data/tmp_data]# a2x -fpdf minimal-book.txt

5. a2x.py 与a2x一样, 只不过为python版本

首先介绍一下aalib

 

aalib 是把所有的图形转换成ascii码的库文件.

AAlib is a software library which allows applications to automatically convert still and moving images into ASCII art.

6. aafire , 在terminal中显示一团火焰

7. aainfo,显示显示器,键盘, 鼠标 使用的aalib驱动程序

aainfo displays information about what drivers aalib will use for the display, keyboard, and mouse, and what parameters, such as screen size those drivers will use

8. aalib-config , 为aalib提供配置信息.

Usage: aalib-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--libs] [--cflags]

9. aasavefont 保存一中字体到文件

10.aatest 显示 测试 aalib 能力

11. aaxine 将mp3,mepg格式文件输出为ascii 格式

--------------------------------------------------------

终于来了个有用的命令

12. ab ,apache 的一个hhtp 压力测试命令

-c 并发数, -n请求次数

 

[root@jjy ~/q/data/tmp_data]# ab -c 3 -n10 http://www.baidu.com/
This is ApacheBench, Version 2.3 <$Revision: 1430300 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking www.baidu.com (be patient).....done


Server Software:        BWS/1.1
Server Hostname:        www.baidu.com
Server Port:            80

Document Path:          /
Document Length:        84859 bytes

Concurrency Level:      3
Time taken for tests:   0.390 seconds
Complete requests:      10
Failed requests:        9
   (Connect: 0, Receive: 0, Length: 9, Exceptions: 0)
Write errors:           0
Total transferred:      859612 bytes
HTML transferred:       850443 bytes
Requests per second:    25.67 [#/sec] (mean)
Time per request:       116.886 [ms] (mean)
Time per request:       38.962 [ms] (mean, across all concurrent requests)
Transfer rate:          2154.57 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        2    2   0.0      2       2
Processing:    13   95  57.2    126     140
Waiting:        4   61  39.8     84      92
Total:         15   98  57.2    128     142

Percentage of the requests served within a certain time (ms)
  50%    128
  66%    131
  75%    134
  80%    141
  90%    142
  95%    142
  98%    142
  99%    142
 100%    142 (longest request)

 

13. abxtest 暂时没有明白怎么用的

14. ac 打印统计用户在线时间

y:打印年

d:打印天

 

[root@jjy ~/q/data/tmp_data]# ac -yd
Oct 24 2014	total        0.73
Oct 25 2014	total       11.57
Oct 26 2014	total       11.41
Oct 27 2014	total       13.33
Oct 28 2014	total       27.91
Oct 29 2014	total       12.85
Oct 30 2014	total       22.85
Oct 31 2014	total       10.96
Nov  1 2014	total       19.64
Nov  2 2014	total       18.10
Nov  3 2014	total       13.57
Nov  4 2014	total       13.65
Nov  5 2014	total       24.24
Nov  6 2014	total       11.29
Nov  7 2014	total       13.16
Nov  8 2014	total       12.32
Nov  9 2014	total        4.14
Nov 10 2014	total       14.61
Nov 12 2014	total       46.82
Nov 13 2014	total       11.81
Nov 14 2014	total       12.48
Nov 15 2014	total        8.03
Nov 16 2014	total       12.53
Nov 17 2014	total       11.35
Nov 18 2014	total       11.70
Nov 19 2014	total       13.53
Nov 21 2014	total       47.57
Nov 22 2014	total        4.41
Nov 23 2014	total        6.81
Nov 24 2014	total       12.93
Nov 26 2014	total       44.73
Nov 27 2014	total       13.36
Nov 28 2014	total        5.93
Nov 29 2014	total        4.91
Nov 30 2014	total        2.50
Dec  1 2014	total       14.51
Today		total       24.37

 

15. accept 接受/拒绝作业发送到目的地,一版作用于打印机吧

16. accountwizard 账户管理工具

17. accton 打开或关闭进程统计信息

 

#touch /var/log/pacct

然后运行:

# accton /var/log/pacct

一旦accton被激活,就可以使用lastcomm命令监测系统中任何时候执行的命令。若要关闭统计,可以使用不带任何参数的accton命令:

# accton

自学PHP网专注网站建设学习,PHP程序学习,平面设计学习,以及操作系统学习

京ICP备14009008号-1@版权所有www.zixuephp.com

网站声明:本站所有视频,教程都由网友上传,站长收集和分享给大家学习使用,如由牵扯版权问题请联系站长邮箱904561283@qq.com

添加评论