歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux綜合 >> Linux命令 >> Linux命令匯總之a.*(一)

Linux命令匯總之a.*(一)

日期:2017/2/28 9:58:42   编辑:Linux命令

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

Copyright © Linux教程網 All Rights Reserved