当前位置:首页 > linux > 正文内容

shell获取当前文件路径

root6年前 (2021-01-06)linux1625

curPath=$(readlink -f "$(dirname "$0")") echo $curPath    #或者 curPath=$(dirname $(readlink -f "$0"))

echo $curPath

扫描二维码推送至手机访问。

版权声明:本文由一叶知秋发布,如需转载请注明出处。

本文链接:https://www.zhiqiu.top/?id=69

分享给朋友:

相关文章

Ubuntu 16.04 RabbitMq 安装与运行

Ubuntu 16.04 RabbitMq 安装与运行

准备工作一台服务器:Ubuntu Server 16.04.1 LTS 64位安装RabbitMq可以参照RabbitMq官网的安装教程(Installing on Debian and Ubuntu),来进行安装。这里我们使用apt-ge...

Cannot uninstall 'ipaddress'. It is a distutils installed project and thus

强制升级:sudo pip install --ignore-installed +模块名...

git 忽略文件不起作用 .gitignore

git rm -r --cached . git add .   git commit -m "update .gitignore"  git status查看是否是"working di...

修改系统server文件需要加载一下配置

vim /usr/lib/systemd/system/*.service修改了server的配置需要执行一下systemctl daemon-reload让系统重新加载以下配置,尤其是server中的配置地址更换了分区...

linux 服务器时间校准

Linux 时间矫正sudo ntpdate -u ntp.api.bz第一使用可能提示ntpdate没安装,用以下命令安装即可ubuntu系统sudo apt install ntpdatecent...

破解zip压缩文件 pyzipper模块

zFile pyzipper.() zFile.(.())...