我忘记了我的 Ubuntu 密码,所以我启动了恢复并进入了 root shell 提示,这就是发生的事情:
root@username-PC:~# passwd username
Enter new UNIX password:
Retype new UNIX password:
passwd: Authentication token manipulation error
passwd: password unchanged
Run Code Online (Sandbox Code Playgroud) 我的目标是能够静音 Spotify 应用程序,而不是整个系统。使用命令:ps -C spotify -o pid=我能够找到 Spotify 的进程 ID,在这种情况下,ID 是"22981". 使用该进程 ID,我想从此列表中搜索:pacmd list-sink-inputs. 该命令返回如下列表:
eric@eric-desktop:~$ pacmd list-sink-inputs
Welcome to PulseAudio! Use "help" for usage information.
>>> 1 sink input(s) available.
index: 0
driver: <protocol-native.c>
flags: START_CORKED
state: RUNNING
sink: 1 <alsa_output.pci-0000_00_1b.0.analog-stereo>
volume: 0: 100% 1: 100%
0: -0.00 dB 1: -0.00 dB
balance 0.00
muted: no
current latency: 1019.80 ms
requested latency: 371.52 ms
sample spec: s16le 2ch 44100Hz
channel map: front-left,front-right
Stereo …Run Code Online (Sandbox Code Playgroud) 我需要帮助创建一个 shell 脚本来在两个命令之间切换。当它运行时command1执行然后如果它再次运行它执行command2等等......
我想更改默认快捷方式来来回切换到 tty。默认情况下它是 ctrl + alt + F#。我曾尝试使用 Ubuntu 的键盘设置制作自定义快捷方式,但它仅在我切换回 tty 时使用图形界面时才有效。所以我需要弄清楚如何更改 ctrl + alt + F# 快捷键的默认绑定,以便在两个 TTY 之间来回切换单键。
我想把两个命令放在一起
我需要脚本来登录:
ssh root@192.168.0.188
Run Code Online (Sandbox Code Playgroud)
然后我需要运行脚本(通过 ssh 登录到 root@192.168.0.188 ):
find /var/mobile/Media/Music/ -name "*.mp3" -exec ln -s {} /var/mobile/Media/Music/"All Songs" \;
Run Code Online (Sandbox Code Playgroud) 每 3 小时,脚本将运行并备份一个文件夹“SOURCE”,并将其与当天的其他备份一起保存在“month-day-year”文件夹中,例如“03-24-13”。当新的一天到来时,它会使用新日期创建一个新文件夹,并删除前一天文件夹中除最新备份之外的所有内容。这就是问题所在,不会删除前一天的旧文件夹。任何想法为什么?
#!/bin/sh
DIR=/media/HDD
SOURCE=/home/eric/Creative/
DATE=$(date +"%m-%d-%Y")
YESTERDAY=$(date -d '1 day ago' +"%m-%d-%Y")
TIME=$(date +"%T")
DESTINATION=$DIR/$DATE/$TIME
SPACE=$(df -P $DIR | tail -1 | awk '{print $4}')
NEEDED=$(du -s $SOURCE | awk '{print $1}')
FOLDERS=$(find $DIR/* -maxdepth 0 -type d | wc -l)
# If there is not enough space, delete the oldest folder
if [ $NEEDED -ge $SPACE ]; then
ls -dt $DIR/* | tail -n +$FOLDERS | xargs rm -rf
fi
# If there is not a folder …Run Code Online (Sandbox Code Playgroud) 我正在尝试编译 abgx360 GUI。
首先我运行,home/eric/Desktop/abgx360-1.0.5/configure但我收到此错误:
检查 C++ 编译器默认输出文件名...
配置:错误:C++ 编译器无法创建可执行文件
有关更多详细信息,请参阅“config.log”。
然后我运行,make但收到此错误:
make: *没有规则可以制作目标`/home/eric/Desktop/abgx360-1.0.5/Makefile.am',
`/home/eric/Desktop/abgx360-1.0.5/Makefile.in' 需要。停止。
这是我的“config.log”:
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by abgx360gui configure 1.0.2, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ /home/eric/Desktop/abgx360gui-1.0.2/configure
## --------- ##
## Platform. ##
## --------- ##
hostname = Eric-Desktop
uname -m = x86_64
uname -r = 2.6.35-27-generic …Run Code Online (Sandbox Code Playgroud)