关于系统方便操作命令的缺失问题 ll 命令
Tofloor
poster avatar
chinsq
deepin
2017-06-05 02:52
Author
很多时候我们使用习惯了 centos 或者 ubuntu 的系统我们发现 ll 命令 这么方便的东西怎么不见了,然后各种纠结 只能使用 ls -l
不过这都没关系,命令我们可以自己定制
步骤1:安装vim 编辑器
  1. sudo apt-get install vim
Copy the Code
步骤2:定义命令名称
  1. sudo vim /usr/bin/<脚本名称>

  2. # 例如我们定义 ll 脚本 如下:
  3. sudo vim /usr/bin/ll
Copy the Code
到这里大家可能都明白了 所谓我们控制的脚本都在这个目录下的太方便的,可以定义属于自己的脚本了
步骤3:输入脚本
  1. #!/bin/bash
  2. ls -l
Copy the Code
保存 然后就可以美美的使用了
Reply Favorite View the author
All Replies
avatar
chinsq
deepin
2017-06-05 02:53
#1
欢迎大家加我 QQ:3406336919 跟诸位大大们一起交流
Reply View the author
avatar
chinsq
deepin
2017-06-05 02:59
#2
哦对了,需要搞完后给那个 命令授权
  1. chmod +x /usr/ll
Copy the Code
Reply View the author
avatar
sudo_free
deepin
2017-06-05 03:12
#3
Reply View the author
avatar
HarryZhao
deepin
2017-06-05 03:14
#4
习惯用别名
Reply View the author
avatar
ghou
deepin
2017-06-05 03:15
#5
一句 alias 搞定的事情,为什么还要搞这么复杂……
KISS!
Reply View the author
Comments
noparkinghere
2017-06-05 17:43
1
avatar
不避风云
deepin
2017-06-05 03:15
#6
老大,别这么逗可以不。你可以在~/.bashrc末尾加一行 alias ll='ls -l',再执行一下 source ~/.bashrc ,可以学学Linux基础知识,再来用deepin的,这样对自己学习效率很有帮助。
Reply View the author
avatar
Feng Yu
deepin
2017-06-05 04:11
#7
ll在任何发行版都是别名,你自己看看centos和ubuntu的alias输出看看
Reply View the author
avatar
a946488029
deepin
2017-06-05 05:58
#8
echo 加你QQ 。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
echo 这个ll la 都是如楼上所说的别名,楼主你是来这个论坛试水的吗?
Reply View the author
avatar
michaelyajun
deepin
2017-06-05 06:14
#9
直接编辑.bashrc中的alias就搞定了   你非要整得这么复杂
Reply View the author
avatar
lcw0268
deepin
2017-06-05 06:15
#10
支持楼主。
Reply View the author
avatar
jingle
deepin
2017-06-05 16:28
#11
为何不在终端自定义命令呢
Reply View the author
avatar
翻过山峰看见云
deepin
2017-06-05 16:32
#12
我只是路过,表示看不懂你们在说什么
Reply View the author
avatar
He8617439
deepin
2017-06-05 16:36
#13
我上手就是deepin,没有别名。。。
Reply View the author
avatar
noparkinghere
deepin
2017-06-05 17:44
#14
缺失 locate 命令,楼主帮整个?
Reply View the author