Questions tagged «command-line»

有关使用命令行界面(CLI)的问题。



1
shopt -s extglob的作用是什么
我想从目录中删除除一个以外的所有文件。我在这里找到了解决方案。该解决方案使用命令 shopt -s extglob 我想知道该命令的确切功能,了解一些后端知识。我还对此答案添加了评论,但直到现在都没有得到答复。作为Ubuntu的新用户,我很好奇这个命令在做什么。

1
如何使用ffmpeg命令反转视频?
我正在尝试使用Android中的FFmpeg库来反转视频。我可以从视频中转储图像,但是如何反转所有图像并制作新视频? 我正在从这里开始使用图书馆。图书馆是compile 'com.github.hiteshsondhi88.libffmpeg:FFmpegAndroid:0.2.5'。我可以使用某些命令,但不能全部使用。我正在使用以下命令从视频中转储图像: -i /storage/emulated/0/ffvid/frameCount.mp4 -an -qscale 1 /storage/emulated/0/ffimg/revi%06d.jpg 我不能使用命令$ffmpeg,$sox并且$cat 我尝试了以下建议,但未成功: 如何反转视频片段| Unix和Linux 使用ffmpeg反转视频剪辑| Blogspot 我还能尝试什么?

1
带“ >>”符号的回声有什么作用?
我看过一些命令 echo '* - nofile 65535' >> /etc/security/limits.conf 我知道echo在屏幕上打印了一些东西。 而limits.conf是该/ etc / security路径中的文件。 但是想在>>这里做吗?它意味着像“到”还是“在”中?

1
命令更改XUbuntu中的墙纸
谷歌搜索显示命令 xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-path -s <image-path> 第一次运行此命令时,我收到一条消息,指出通道xfce4-desktop中不存在/ backdrop / screen0 / monitor0 / image-path属性。 因此,我创建了此属性: xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-path -n -t string -s <image-path> 但是背景仍然没有改变。 然后,我通常通过XUbuntu的“桌面设置”应用程序将背景从space-03.jpg更改为space-04.jpg。然后我运行: $ xfconf-query -c xfce4-desktop -p /backdrop -lv /backdrop/screen0/image-path /usr/share/backgrounds/space-03.jpg /backdrop/screen0/monitor0/image-path /usr/share/backgrounds/space-03.jpg /backdrop/screen0/monitor0/image-show true /backdrop/screen0/monitor1/image-path /usr/share/backgrounds/space-03.jpg /backdrop/screen0/monitor1/image-show true /backdrop/screen0/monitorLVDS1/workspace0/color-style 0 /backdrop/screen0/monitorLVDS1/workspace0/image-style 5 …

3
如何通过命令行启用点击单击?
您可以使用它来反转滚动方向(自然滚动): xmodmap -e "pointer = 1 2 3 5 4 7 6 8 9 10 11 12" 您也可以使用 xmodmap -e "pointer = 1 2 3 4 5 7 6 8 9 10 11 12" 这可以切换左右按钮: xmodmap -e "pointer = 3 2 1" 然后用 xmodmap -e "pointer = 1 2 3" …



2
如何编写由gnome-tweak-tool进行的设置的脚本?
我希望能够从命令行进行配置,因此当我重新安装操作系统时,我可以运行脚本并重新获得我的首选配置。 自从“升级”到Ubuntu 17.10以来,我发现我不得不使用gnome-tweak-tool来获得我想要的设置。 在gnome-tweak-tool GUI中找到设置后,如何找出其可脚本化的翻译? 例如,以下gsettings行与下面的gnome-tweak-tool屏幕截图中的相关条目匹配... gsettings set org.gnome.desktop.wm.preferences titlebar-font "Tahoma Bold 8" gsettings set org.gnome.desktop.interface font-name "Tahoma 8" gsettings set org.gnome.desktop.interface document-font-name "Tahoma 8" gsettings set org.gnome.desktop.interface monospace-font-name "FixedSC 10" ...但是有人会怎么猜呢?例如,如何确定提示和抗锯齿的相应设置?

2
如何防止grep多次打印相同的字符串?
如果我grep包含以下内容的文件: These are words These are words These are words These are words ...对于单词These,它将打印字符串These are words四次。 如何防止grep打印多次重复字符串?否则,如何处理grep的输出以删除重复的行?


4
从命令行运行PHP
我已经为我的PHP开发安装了XAMPP v1.8.3。我是Ubuntu的新手,所以我不知道如何为位于的PHP设置环境变量/opt/lampp/bin/php。 我可以localhost很好地运行PHP脚本,但是我也想从命令行运行它们。 我想为每个用户设置此变量,因为我是唯一使用此系统的用户。

6
如何从终端获取当前的gnome键盘布局?
为了在bash脚本中使用,我需要获取用户当前正在使用的gnome键盘布局。例如,如果用户将其键盘布局设置为en-us,那么我需要一个bash命令来向我打印此命令。 我如何获得该信息? 更新: setxkbmap -query不幸地是无法正常工作。以下是激活了en(第一个命令)和de(第二个命令)布局的输出。切换键盘布局似乎与gnome会话配置有关 setxkbmap -query rules: evdev model: pc105 layout: us,de variant: , options: terminate:ctrl_alt_bksp,lv3:ralt_switch,grp:alts_toggle setxkbmap -query rules: evdev model: pc105 layout: us,de variant: , options: terminate:ctrl_alt_bksp,lv3:ralt_switch,grp:alts_toggle 更新2: setxkbmap -print #with en-us layout xkb_keymap { xkb_keycodes { include "evdev+aliases(qwerty)" }; xkb_types { include "complete" }; xkb_compat { include …

1
如何更改TCP / IP数据包的默认TTL?
我需要更改从我的Ubuntu计算机发送的TCP / IP数据包的默认TTL。我找到了Windows的解决方案: 制作reg文件: Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\servic es\Tcpip\Parameters] "DefaultTTL"=dword:00000081 要在控制台中执行此命令: netsh int ipv4 set glob defaultcurhoplimit=129 netsh int ipv6 set glob defaultcurhoplimit=129 问题是我应该如何为Ubuntu翻译此解决方案?

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.