Questions tagged [command-line]

The command-line is the interactive interface to your shell.

437 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
9
votes
1answer
1k views

Replace a image in a PDF using command line

I need to process some PDF files. The task consists in exchange a given image file by another. My first problem is how to replace a PDF image from command line in a batch process. Next I'll try to ...
9
votes
2answers
6k views

diff -r only for certain file types

Is there a way I can perform a recursive diff of two directories but only compare (in their respective places) files that match a specific filename or filetype predicate? E.g. I would like to do ...
6
votes
1answer
2k views

How to access the Evolution calendar data from the command line?

I want to be able to access the Evolution calendar from the command line. Specifically, I'd like to be able to: List calendar events (the one-line summary, date and time is enough) Upcoming events ...
4
votes
0answers
92 views

find and symbolic link

I was skimming over the documentation of find to better utilize the command usage. I was reading the part that says GNU find will handle symbolic links in one of two ways; firstly, it can ...
4
votes
1answer
175 views

is it possible to colors the prompt for (reverse-i-search) context menu?

I am using fedora 25 but I think this is a general behavior on unix system. When I ctrl+r in a command-line environment I can start to type in and anything I type will get to be matched backward in ...
4
votes
0answers
452 views

two piped commands, each needs to read password from stdin

Is there a way to sensibly do this: scp user@host:/path/to/file /dev/tty | openssl [options] | less without creating a file, and without having to supply either password directly in arguments? The ...
4
votes
2answers
742 views

Modify Openbox key-bindings from commandline

I am using the LXDE desktop environment, which is based on Openbox. I know how to change the key-bindings by editing my ~/.config/openbox/lxde-rc.xml, e.g.: <keybind key="A-F11"> <action ...
4
votes
1answer
250 views

I am stuck connecting to the internet via a usb wifi stick

I am trying to set up a an internet connection through a usb wifi sticker in Linux. Here's the sequence I tried: iw dev This returns the name(?) of the Interface that I want to connect to: phy#0 ...
4
votes
0answers
781 views

Program like vnStat that filters for only external (Internet) traffic

I've been using vnStat to monitor the ethernet interface on a Linux computer, but found that it includes all local traffic. I do many file transfers from within the subnet which far exceeds the ...
4
votes
0answers
4k views

Can't login via telnet in ddwrt

I have a Gateworks laguna 2388 router with dd-wrt firmware installed in it. It was working fine till i change "http_passwd" nvram attribute. I wanted to change the web GUI password via telnet. So I ...
4
votes
2answers
430 views

How do I make the CLI run on dedicated graphics?

I just finished my Gentoo minimal install and the first thing I wonder is why I get no picture. I did have signal on the live CD, so that was pretty odd. I plugged the monitor into the Intel HD ...
4
votes
2answers
1k views

Jingle CLI client / Jitsi replacement / VOIP

I am looking for a Jingle client for the command line. Currently, I use Jitsi, but my dreams of not needing the GUI for more than just web-browsing are not realized due to my reliance on this program....
3
votes
0answers
641 views

How to pair a Datalogic QuickScan Bluetooth barcode scanner using SPP?

I would like to pair a Bluetooth barcode scanner in "Serial Port Profile Mode" (SPP) using bluetoothctl on Arch Linux. The device is: [bluetooth]# info 00:07:BE:1C:40:C4 Device 00:07:BE:1C:40:C4 (...
3
votes
1answer
281 views

Is there a way to set the QT icon theme, and other theme elements, from the command line?

I'm trying to automate the process of theming QT5 programs, in the absence of a DE like KDE, by writing a script that does it. I know that GTK has a bunch of config files that can specify all the ...
3
votes
0answers
154 views

How can I paste a gif from the clipboard with xclip?

I'm trying to copy a gif into my clipboard such that I would be able to paste it into web applications (slack, github, etc.). I have tried the following without any luck: xclip -selection clipboard -...
3
votes
0answers
66 views

What's the “Unix Way” to propery format tabular output?

I'm writing a set of "Unix Way" tools, where you have a set of small tools that you can pipe into each other (and other tools). The question (more details as to why I care below) is this: Is there a ...
3
votes
0answers
323 views

Bash 4.4 change color vi mode

I am using +~ $ bash --version GNU bash, version 4.4.0(1)-release (x86_64-unknown-linux-gnu) Copyright (C) 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://...
3
votes
1answer
508 views

How to 'hash -r' and refresh all shells?

This is related to What is the purpose of the hash command? After installing a program I am looking for a way to tell all open shells to update their cache. I often have 6 to 8 of them open and I don'...
3
votes
0answers
279 views

Control characters in a terminal with an active foreground process

Say I have a process running in a terminal in the foreground. While it is active I can type commands, hit return, and those will be executed once the process is done. Now say furthermore I would like ...
3
votes
1answer
290 views

Synchronize IMAP to maildir folders - fast and complete solution with IDLE support?

This is likely to be borderline subjective, but I am searching for good alternatives for command line IMAP to maildir clients: Currently I am using offlineimap, but the docs are lacking, and support ...
3
votes
0answers
418 views

Mount a Thunar/Nautilus/Nemo gvfs bookmark using command line

I have some bookmark that use smb/sftp through gvfs, how to mount them using command line? when I click them (mount using mouse click), it shows on /run/media/myuser/BookmarkName So, is there any ...
3
votes
1answer
4k views

How to install and set new themes in KDE plasma via terminal

I've been having some issues with the breeze theme while starting plasma and I want to know if there is a way to install a another plasma theme via the terminal and set that to default. I'm using arch ...
3
votes
1answer
425 views

Zsh clear command line from zsh/sched call

I try the following: clear-cmdline() { zle && zle kill-buffer sched +3 clear-cmdline } sched +3 clear-cmdline After I run this code, I enter a few letters at prompt, and wait. ...
3
votes
2answers
1k views

How can I merge 2 disk images into one with 2 partitions?

I have 2 (relatively small) disk images for qemu (raw format) containing different filesystems (say fat and ext4). I want to put them into an usb stick as two different partitions so that I can plug ...
3
votes
3answers
143 views

how to tell firefox to shutdown cleanly from tty1?

Lately I run Firefox almost exclusively from on one of my Debian laptops (which run testing). Occasionally (~monthly) my desktop/tty7 hangs, in which case I usually can goto tty1 and sudo shutdown -[...
3
votes
0answers
507 views

How do I install FreeBSD without bsdinstall?

I would very much like to install and generally configure FreeBSD from the command line without using bsdinstall UI. How do I prevent the live CD from starting into bsdinstall and more important is ...
3
votes
0answers
3k views

How to change block device names, e.g. /dev/sdc to /dev/sdb?

Example of why this might be desired: I connect a block device, which shows up as /dev/sdb, and mount it. Later that device gets removed without being unmounted. The block device is reconnected, but ...
3
votes
1answer
181 views

Highlighting with regex within ssh session?

I'm working with a lot of routers and switches from Juniper, Brocade etc and none of those vendors have syntax highlighting or output coloring. Does anyone know a working solution: how to setup ...
3
votes
1answer
4k views

nmcli connection activation failed

I was able to create a wifi hotspot on my debian 8 install using network tab under gnome settings. I was trying to do the same using nmcli but it always shows $nmcli con up id Hotspot Error: ...
3
votes
1answer
1k views

Show connected printers in CUPS

Is there a way to list the available/connected printers in CUPS using the command line or better yet using the CUPS API ? I already tried lpstat -a but it only lists the installed printers and not ...
3
votes
1answer
2k views

Run vsim from dmenu — it only works when directly invoked in the terminal

Works: vsim, sh -c vsim Doesn't work: echo "vsim" | sh, echo "vsim" | xargs -I {} sh -c "{}" I want to run ModelSim (vsim) with dmenu, which is triggered using xbindkeys. Details vsim is a ...
3
votes
0answers
280 views

How to abort/cancel a running command in initramfs?

When I invoke a long-running command, e.g. du, I don't see a way to abort/cancel it (Strg/Ctrl+c doesn't work), other shells/ttys aren't available. Am I completely doomed after having started a long ...
3
votes
1answer
1k views

Xorg Setting checking from Command Line

How do I determined, whether Xorg is using Xinerama, DDC and Reduced Blanking ?? Just adding few options in Xorg.conf is sufficient ? If I have to check from command-line, then how can I check ...
3
votes
2answers
4k views

IBM V7000 scripts for monitoring

Hello (I'm no hard core coder:), I try to develop a script to do some very basic monitoring on an IBM SVC. My goal is to get some information about the nodes and my quroum status and then send ...
3
votes
0answers
115 views

Importing hdhomerun channels into MythTV

I am setting up a MythTV backend, to stream Live TV from. I scanned for channels with the hdhomerun_config utility, and got this However, I really don't have a clue how to import it into MythTV.
3
votes
1answer
234 views

Coloring terminal commands (like LS and CD)

I do know I can color my terminal using the PS1 variable. Now, I would like to discover if there is a way to put some color on the bash commands I often use. I'd like to type, something like, "$ ls /...
3
votes
1answer
223 views

Why does the kernel boot faster with less memory allocated?

This is not an important question, I'm just curious. Something strange happened, which isn't quiet clear to me: In the kernel command line, the amount of the memory can be set statically with the mem=...
2
votes
0answers
25 views

extract last 5 mins of information from the log file

system date format: Thu Jun 13 12:55:18 EDT 2019 My log format: 193.118.26.141 - - [01/May/2019:00:08:49 -0400] "GET / HTTP/1.1" 200 27 can someone please help me, how to get last 5 minutes of ...
2
votes
2answers
130 views

Create a script to check the date, time and string and trigger a mail

Need to create a script where I want to take the last few lines of the log file and check that the last line with Start Date contains the date of today and the time 17:00:xx and is followed by xxxxx ...
2
votes
1answer
152 views

How to generate (git) diffs with <n> characters of context?

The --unified=<n> option lets you set the number of lines; is there a way to do the same for characters? example limit the context around the changes to X character(s) when using git diff --...
2
votes
0answers
63 views

Why can't I send a post request to my server after SSH logout?

I've created a .jar file which listens on port 8089 and receives post requests. I start it in the background on my linux machine with the following commands: nohup java -jar myServer.jar & [1] ...
2
votes
1answer
61 views

Get Unix to Tell Me The “x similar ones”

Often if I am doing something in the terminal I will mistype something and enter something unintended. If I type int as a trivial example, it tells me Command 'int' not found, but there are 18 ...
2
votes
0answers
130 views

Does this sync call work as expected?

I'm writing a file (let's call it, xyz.bin) to a USB Flash drive... the flash drive mounts under the path: /media/myUsb ... In order to prevent data loss, I'm doing a sync command like this: sync -f ...
2
votes
0answers
175 views

Make ssh-keyscan use the .ssh/config settings

Is there a way to use the ~/.ssh/config file with the ssh-keyscan command? My tests are showing that this is not working, but perhaps there is a setting or something that would allow it? Any ...
2
votes
3answers
51 views

Syntax for using epoch times in a calculation with the `--date=STRING` usage of the `date` command

I have a time represented as seconds since 1970-01-01 00:00:00 UTC, like 1524884843. I want to get the time, say, 1 month from the above specified time. Normally if I want to get the time 1 month ...
2
votes
0answers
668 views

Convert .odt to .pdf on the command line - include automatically inserted blank pages

"How to convert libreoffice ODT to PDF in bash" has a nice description of how to convert .odt to .pdf. It does, however, not work if you want to check 'Export automatically inserted blank pages'. ...
2
votes
1answer
94 views

replacing values in one with the values in another file

I have a csv file named eche in following format: INCON,--,INITIAL,CONDITIONS,FOR*****,ELEMENTS,AT,TIME ,0.315570E+13 VC76,0.10000000E+00,0.2837726135782E+08,0.6756896308414E+02 1K02,0.10000000E+00,0....
2
votes
0answers
882 views

Batch convert ISO/WAV/CUE back into BIN/CUE

I've been looking for a command utility/script that does the opposite of bchunck, but can't seem to find one. What bchunck does is taking a mixed-mode CD image in BIN/CUE format and separate it into ...
2
votes
0answers
90 views

iotop. Don't remove exited processes/threads from the list

When run # iotop -ao, a process/thread disappears from the list if the process exits and the data on it is lost from the list. How to make it stay on the list?
2
votes
1answer
5k views

Is cat the only reliable command that can read data from serial?

I have a scale that continuously send data via serial port, 2 times per second. The only reliable way on reading this data happened to be cat command. The following works: cat /dev/ttyUSB0 But the ...