Bash

bash shell基础命令

bash shell基础命令 很多Linux发行版的默认shell是GNU bash shell。 1. 启动shell GNU bash shell是一个程序,提供了对Linux系统的交互式访问。它是作为普通程序运行的,通常是在用户登录终端时启动。系统启动的shell程序取决于用户账户的配置。 / ......
命令 基础 shell bash

打印出目录下所有文件名(给出 C、Bash两个版本)

bash function fl () { if [[ -z "$1" ]]; then fl_read_dir $PWD elif [[ "${1: -1}" == '/' ]]; then fl ${1%/} else fl_read_dir $1 fi } function fl_read_d ......
文件名 两个 版本 文件 目录

Bash工作手册

本文主要讲述bash的配置,各种命令(包含内置命令以及类似内置命令的指令),运行原理等主题 Bash配置 自动补全 $ type complete complete is a shell builtin https://juejin.cn/post/6844904096411942926 https ......
工作手册 手册 Bash

BASH: issues

$@ "$@" $* "$*" a.sh echo "$@" echo $@ echo "$*" echo $* b.sh "$@" b.sh $@ b.sh "$*" b.sh $* b.sh echo $# for param; do echo "param = $param" done ......
issues BASH

Cygwin Bash Shell借助PHP快速计算两个日期或时间的日期差、时间差

概述 PHP有 datetime.diff工具类可以便捷地精确地计算两个日期时间之间的差值( 详见PHP官方文档:https://www.php.net/manual/zh/datetime.diff.php ),很多时候我们需要在终端通过命令参数调用的形式快速获取结果,故封装以下参数。 BTW,为 ......
日期 时间 时间差 两个 Cygwin

BASH: history

HISTCONTROL variable is a colon-separated list of values controlling how commands are saved in the history list. HISTCONTROL=ignoredups It causes line ......
history BASH

git bash报错fatal: detected dubious ownership in repository at的解决方法

情况 在git bash中输入"git add ."命令时报错"fatal: detected dubious ownership in repository at" 原因 文件夹的所有者和现在的用户不一致 例如:文件夹的所有者是Administrator,而当前用户是myAccount 方法1 右 ......
repository ownership detected dubious 方法

bash: /dev/null: Permission denied

现象: 问题: 一般而言,Permission denied 问题可以通过 reset 权限 chmod 666 /dev/null 来解决,但在 Ubuntu 中,系统会自动将设备的权限还原为 420 crw--w 1 root tty 1, 3 Aug 26 11:46 /dev/null。所以 ......
Permission denied bash null dev

CMD、Powershell、Bash

总体来说,CMD、Powershell和Bash都是命令行工具,用于执行各种命令和脚本,但它们的功能和用法都有所不同,根据不同的需求选择不同的命令行工具。 CMD CMD(Command Prompt)是Windows操作系统中的命令行工具,提供了基本的命令行交互功能,如文件管理、进程管理、网络管理 ......
Powershell Bash CMD

git bash 结束显示

当我们打开git bash here工具输入git branch -a时,由于项目太多,无法显示全部,到最后出现END,此时我们要输入其它命令却不可以输入,回车,空格,没有什么反应,感觉被卡住了,只有关闭,再打开重新输入命令查看相关的信息,出现这种现象只需要在命令行里面输入q 解决方法,输入键盘上的 ......
bash git

git bash 不能输入任何内容

我无法在Git-Bash命令行输入任何字符; 它显示的是一个闪烁的光标.Git Bash昨天工作正常,但我现在无法做任何事情.我该怎么做才能解决这个问题? 解决方案 解决方案是键入reset<Enter> 原因: 原来它可能是任何shell程序(cmd,git bash等)的问题,不一定只是一个Gi ......
内容 bash git

bash的特性

1、命令和文件自动补全 Tab只能补全命令和文件 (RHEL6/Centos6) 2、常见的快捷键 ^c 终止前台运行的程序 ^z 将前台运行的程序挂起到后台 ^d 退出 等价exit ^l 清屏 ^a |home 光标移到命令行的最前端 ^e |end 光标移到命令行的后端 ^u 删除光标前所有字 ......
特性 bash

利用Git Bash工具将本地创建的项目上传到Gitee

一、安装Git1、下载Git Bash工具 官网下载 https://www.git-scm.com/download/https://www.oschina.net/action/GoToLink?url=https%3A%2F%2Fwww.git-scm.com%2Fdownload%2F 1. ......
工具 项目 Gitee Bash Git

shell报错:bash:./xxx: 无法执行二进制文件: 可执行文件格式错误

shell报错:bash:./xxx: 无法执行二进制文件: 可执行文件格式错误 在ubuntu下运行一个可执行文件,但是出现错误: 由于文件已经拥有可执行权限,遂考虑是不是该文件编译时的CPU指令集和我的平台不同。 于是用file命令查看文件格式: 破案了,该文件是一个Windows下的可执行文件 ......
文件 二进制 错误 格式 shell

Mac中的Zsh和Bash

使用Mac系统的朋友应该比较熟悉Zsh和Bash这两个shell,但是对二者具体有什么区别可能不太了解。本文将从这两个shell入手,对相关概念以及二者区别进行解释。 1.什么是shell?shell 单词的本意是“壳子”,在计算机领域一样可以理解为机器外面的一层壳,目的是进行用于人机交互,本质上是 ......
Bash Mac Zsh

【问题记录】【Linux】bash: ps: command not found

1 bash: ps: command not found apt-get update && apt-get install procps 2 bash: ll: command not found echo "alias ll='ls -rltha'" >> ~/.bashrc && sourc ......
command 问题 Linux found bash

你了解你系统的bash吗

https://en.wikipedia.org/wiki/Unix_shell 以下来自wiki 1、 unix shell主要有以下的类别(unix系统有些系统也在使用gnu的bash) Almquist shell ( ash ): written as a BSD-licensed repl ......
系统 bash

XFCE4中开启或关闭面板bash脚本

下面是一个基于 xfce4-panel 的脚本,可以切换面板的开启状态: #!/bin/bash # 查找进程 xfce4-panel if pgrep xfce4-panel >/dev/null; then # 关闭 xfce4-panel killall xfce4-panel # echo ......
脚本 面板 XFCE4 XFCE bash

BASH: disable shell builtin

enable Use the `env` command. Env is a command which launches another program with a possibly modified environment. Because env is a program, it doesn ......
disable builtin shell BASH

BASH: default PATH

default PATH env -i bash -c 'echo $PATH' command -p getconf PATH ......
default BASH PATH

Linux bash script HereDoc All In One

Linux bash script HereDoc All In One Linux shell script multi-lines comments / Linux shell script block comments Linux shell 脚本多行注释/Linux shell 脚本块注释 ... ......
HereDoc script Linux bash All

Linux中bash脚本里set -x的作用是什么?

参考资料: https://www.runoob.com/linux/linux-comm-set.html 初见set是这个命令set -x,出现在运行集群训练代码的bash脚本中,不知道它的作用是什么。查看了参考资料后知道了它的作用:即 -x 执行指令后,会先显示该指令及所下的参数。 至此,作用 ......
脚本 作用 Linux bash set

docker bash: xxx : command not found

1.现象: 在容器内执行route命令会报错 bash: route: command not found 2.原因 容器内没有安装route命令 3.解决办法 (1)bash: ip: command not found apt-get update && apt-get install -y i ......
command docker found bash xxx

Linux Bash Shell 中变量的 5 个易错点

Linux 中的 Bash 脚本支持对变量的操作,下面咸鱼将介绍 Linux Bash Shell 中关于变量的 5 个易错点 因为编程习惯,这类现象往往发生在大多数使用过其他流行编程语言的程序员身上 变量赋值 对于许多编程语言(例如 Python),变量赋值的时候在等号两边添加空格是一个好的习惯 ......
变量 Linux Shell Bash

让 MSYS2 Bash 像 Git Bash 一样显示 Git 分支名称

Git for Windows 的 Bash 有一个很实用的功能,如果当前目录处于 Git 仓库中,那么命令行中会显示当前 Git 分支的名称(见下图)。 然而原版的 MSYS2 Bash 没有这个功能(见下图),不过我们可以自己动手配置出相同的效果。 配置方法 打开 MSYS2 的家目录,找到 . ......
Bash 分支 Git 名称 MSYS2

linux 基础(6)简单认识 bash

shell 和 bash 是什么? shell 是一种应用程序,在这个程序里输入文字指令,系统就会做出响应的操作。这个“壳程序”是我们使用系统各种功能的接口,学会了 shell 就是学会操作 linux 系统。检索/etc/shells,可以看到当前系统的 shell 有哪些。而 bash (Bou ......
基础 linux bash
共206篇  :7/7页 首页上一页7下一页尾页