linux 打印当前所在目录,并展示当前内目录列表
来源:互联网 发布:矢量量化算法 编辑:程序博客网 时间:2024/05/13 15:55
在个人的HOME目录内新建一下BIN文件夹,创建一个PL文件<div>写入</div><div><div>pwd</div><div>echo -e "\n"</div><div>ls $1 $2</div></div><div></div><div>保存后 </div><div>chmod +x pl</div><div>编辑.bashrc文件</div><div>添加</div><div>export PATH="$PATH:/home/sky/bin/"</div><div>保存退出,再登陆,个人的环境变量就生效了</div><div>这样就可以用pl了</div><div><div style="color: rgb(70, 70, 70); font-family: simsun; font-size: 14px; line-height: 21px; background-color: rgb(188, 211, 229);">sky@sky-To-be-filled-by-O-E-M:~/server$ pl</div><div style="color: rgb(70, 70, 70); font-family: simsun; font-size: 14px; line-height: 21px; background-color: rgb(188, 211, 229);">/home/sky/server</div><div style="color: rgb(70, 70, 70); font-family: simsun; font-size: 14px; line-height: 21px; background-color: rgb(188, 211, 229);"></div><div style="color: rgb(70, 70, 70); font-family: simsun; font-size: 14px; line-height: 21px; background-color: rgb(188, 211, 229);"></div><div style="color: rgb(70, 70, 70); font-family: simsun; font-size: 14px; line-height: 21px; background-color: rgb(188, 211, 229);">memcached <wbr>nginx <wbr>php</wbr></wbr></div><div style="color: rgb(70, 70, 70); font-family: simsun; font-size: 14px; line-height: 21px; background-color: rgb(188, 211, 229);"></div><div style="color: rgb(70, 70, 70); font-family: simsun; font-size: 14px; line-height: 21px; background-color: rgb(188, 211, 229);"></div><div style="color: rgb(70, 70, 70); font-family: simsun; font-size: 14px; line-height: 21px; background-color: rgb(188, 211, 229);"></div><div style="color: rgb(70, 70, 70); font-family: simsun; font-size: 14px; line-height: 21px; background-color: rgb(188, 211, 229);">进入目录并展示目录结构 cl</div><div style="color: rgb(70, 70, 70); font-family: simsun; font-size: 14px; line-height: 21px; background-color: rgb(188, 211, 229);"><div>cd $1</div><div>pwd</div><div>echo -e "\n" <wbr></wbr></div><div>ls <wbr></wbr></div><div></div><div>注意执行CL的时候,需要加上SOURCE,当前的目录路径不会变的,因为执行SHELL的时候,会创建一个子SHELL,切换目录的变量执行完就没有了,在当前的SHELL内没有得到切换后的路径</div><div></div></div></div>
0 0
- linux 打印当前所在目录,并展示当前内目录列表
- 获取当前应用程序所在目录
- linux 获取当前进程的可执行文件所在的目录
- Linux学习笔记--目录处理命令----pwd ---打印当前目录
- Linux 获取当前目录
- linux 获取当前目录
- Linux获取当前目录
- ASP得到当前文件所在目录
- 获取当前应用程序所在目录的路径
- 获取当前程序所在路径/目录
- SoapUI 获取当前运行项目所在目录
- bat脚本获取当前文件所在目录
- GetModuleFileName 获取当前程序可执行文件所在目录
- 中获取当前程序本身所在目录
- eclipse打开当前文件所在目录方法
- 获取当前应用程序所在的目录
- 获取 .sh 文件当前所在目录
- shell获得当前脚本所在目录
- 动态加载USB Audio Device
- Http协议中 get和post的区别
- 5分钟了解Mockito
- MFC学习心得【画笔字体类】
- Android 音频系统
- linux 打印当前所在目录,并展示当前内目录列表
- sort--uva10474
- 复杂数据类型
- php 安装memcached扩展
- Leetcode_num7_Linked List Cycle
- UVa 10881 - Piotr's Ants
- 搜索引擎:solr--搭建和分析中文分词器。上
- nginx + php + https 配置用例
- curl 测试 restful 方式