oracle alias 大小写,AIX的alias太强大了!

在.profile中加如下语句

alias lslog='ls -l $(cat ~/curr_logr_name.txt)|sort +5'

然后就可以直接进行lslog来查看了

另:

curr_logr_name.txt的实际内容如下

qry_db2$(/home/dsg)vi curr_logr_name.txt

"curr_logr_name.txt" 19 lines, 456 characters

/dsg/bill_1/log/log.r0

/dsg/bill_2/log/log.r0

/dsg/bill_2/log/log.r2

/dsg/bill_2/log/log.r3

/dsg/bill_2/log/log.r5

/dsg/bill_2/log/log.r6

/dsg/bill_2/log/log.r7

/dsg/bill_2/log/log.r8

/dsg/bill_3/log/log.r0

/dsg/bill_3/log/log.r1

/dsg/bill_3/log/log.r2

/dsg/bill_3/log/log.r3

/dsg/other/log/log.r0

/dsg/other/log/log.r1

/dsg/other/log/log.r2

/dsg/other/log/log.r3

/dsg/peizhi/log/log.r0

/dsg/stat/log/log.r0

/dsg/stat/log/log.r1

实际操作

qry_db2$(/home/dsg)lslog

-rw-r--r--   1 dsg      dba            2209 Oct 09 16:05 /dsg/bill_3/log/log.r2

-rw-r--r--   1 dsg      dba           32105 Oct 09 16:30 /dsg/stat/log/log.r1

-rw-r--r--   1 dsg      dba            3216 Oct 09 16:33 /dsg/peizhi/log/log.r0

-rw-r--r--   1 dsg      dba            2884 Oct 09 16:38 /dsg/bill_2/log/log.r0

-rw-r--r--   1 dsg      dba          278088 Oct 09 16:39 /dsg/stat/log/log.r0

-rw-r--r--   1 dsg      dba          497010 Oct 09 16:40 /dsg/bill_3/log/log.r1

-rwxrwxrwx   1 dsg      dba          331815 Oct 09 16:41 /dsg/bill_1/log/log.r0

-rw-r--r--   1 dsg      dba           52270 Oct 09 16:41 /dsg/bill_2/log/log.r2

-rw-r--r--   1 dsg      dba           52652 Oct 09 16:41 /dsg/bill_2/log/log.r3

-rw-r--r--   1 dsg      dba           52419 Oct 09 16:41 /dsg/bill_2/log/log.r5

-rw-r--r--   1 dsg      dba           37184 Oct 09 16:41 /dsg/bill_2/log/log.r6

-rw-r--r--   1 dsg      dba           37135 Oct 09 16:41 /dsg/bill_2/log/log.r7

-rw-r--r--   1 dsg      dba           46898 Oct 09 16:41 /dsg/bill_2/log/log.r8

-rw-r--r--   1 dsg      dba          675151 Oct 09 16:41 /dsg/bill_3/log/log.r0

-rw-r--r--   1 dsg      dba          658199 Oct 09 16:41 /dsg/bill_3/log/log.r3

-rw-r--r--   1 dsg      dba           96284 Oct 09 16:41 /dsg/other/log/log.r0

-rw-r--r--   1 dsg      dba          128179 Oct 09 16:41 /dsg/other/log/log.r1

-rw-r--r--   1 dsg      dba          140618 Oct 09 16:41 /dsg/other/log/log.r2

-rw-r--r--   1 dsg      dba          139080 Oct 09 16:41 /dsg/other/log/log.r3

不过我对那个SORT+5和CAT那个组合还是看不明白啊,请大家看懂的指导一下,谢谢!

此外还有

alias durmp='du -k /dsg/bill_1/rmp && du -k /dsg/bill_2/rmp && du -k /dsg/stat/rmp && du -k /dsg/other/rmp && du -k /dsg/bill_3/rmp'

alias dureal='cd /dsg;du -sm $(find . -name real[0-9]);cd -'

的写法,其中的&& ; cd - 都看不懂,感觉好怪异

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值