Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [command-line]

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

2
votes
0answers
15 views

mbuffer how does the -T Param work

I'm currently trying to make a tar backup to a tape with mbuffer acting as a buffer between e.g: tar --acls -c /var/test | mbuffer -m 8G -P 100% -R 100M | dd of=/dev/nst0 bs=256k But the buffer is ...
1
vote
1answer
133 views

Bash prompt getting garbled when I browse history?

I have MacOS and .bash_profile content: export PS1="\[\e[0;31m$\]\[\e[m\] \[\e[0;32m\w\e[m\] : \]" as a result I have pwd printed in terminal like this: but when I press up and down arrows to use ...
-1
votes
0answers
17 views

Makefile: Linters and Formatters [on hold]

Are there any CLI Makefile Linters and Formatters? Also, does it support the GNU dialect?
8
votes
3answers
916 views

Why can't I see the “wget” job when I execute it in the background?

I use wget command in the background like this wget -bq and it prints Continuing in background, pid 31754. But when I type the command jobs, I don't see my job(although the downloading is not ...
3
votes
1answer
45 views

Commands Differences Using Quotations (Find)

I was reading the man page of find and I found myself confused with the following commands. What is the difference between one and its corresponding one. What is the difference between the following ...
0
votes
1answer
26 views

bash: ucbps: command not found

How do I solve this? bash: ucbps: command not found [cbwlskbd@cbl06677app08 ~]$ Where to include the path for this? and how the paths are included
-1
votes
1answer
66 views

How to send ^D / EOT character to stdin of a shell process?

Suppose I have two shells open, one with PID 1234 and the other - 5678. I can clear the screen and reset of the other shell via echo $'\033c' > /proc/1234/fd/0 as if reset was typed on the prompt ...
1
vote
0answers
19 views

Command to list all reserved words [duplicate]

Is there a command to list all reserved words? I'm aware of resources such as the GNU reserved word index, but what I'm looking for is a command that gives me this information for my shell on the ...
0
votes
0answers
22 views

Zsh: slow when run bash shell script [on hold]

I have a script that written completely with bash compatible in mind, that used with dmenu to handle a task. I use zsh as default shell, in that script I have shebang like #!/usr/bin/env bash, dmenu ...
11
votes
2answers
884 views

Use chmod command selectively

I want to set 755 permission on all files and sub-directories under a specific directory, but I want to execute chmod 755 only for those components which does not have 755 permission. find /...
1
vote
1answer
23 views

Remove Package and dependencies installed along with it

I noticed while removing httpd package that dependencies installed all not removed along with that # yum remove httpd How can i remove a package and dependencies which were installed along with that ...
1
vote
0answers
22 views

Script get in process multiple times

I have a script that starts, kills or restarts several java programs. However, when I execute it, it ends up running multiple multiple times in the background. This is my script: #!/bin/bash export ...
0
votes
0answers
11 views

Chrome gets closed after few seconds in ubuntu 14.04

I want to update my chrome browser but as soon as i updated it using command apt-get update wget chrome-package apt-get install google-chrome it get install but it is getting quite every ...
9
votes
1answer
332 views

get three-letter day name from date command

date +%b gives me the three-letter abbreviation of the current month name (I found that out online, it's not in my man date nor can I find the answer to this question in my man date). How do I get ...
2
votes
2answers
43 views

compressing and decompressing dd image - zstd instead of gzip

Earlier I was using fsarchiver to create compressed partition image. Due to some weird behavior I am choosing to replace it with dd. However, I like how fsarchiver compressed with zstd. So, I ...
0
votes
1answer
15 views

fsarchiver taking ages to backup and restore

Using Linux Mint 19.1 bootable USB Ext4 filesystem Processor 8600k Ram 16gb By default fsarchiver uses zstd compression Earlier when I used the following two commands, each command individually took ...
1
vote
1answer
62 views

Translate BATCH to Bash

Hello Unix & Linux Community, I am here to ask how I can translate a Windows Batch File (.bat), into a Linux Bash File (.sh), because I want to allow a program I made, into Linux. But I have no ...
0
votes
0answers
6 views

Can run the command when specify the path, but cannot run it by name although PATH points to it [duplicate]

I have the following setup: $ which pip3.7 /py36env/bin/pip3.7 $ sudo pip3.7 list sudo: pip3.7: command not found $ sudo /py36env/bin/pip3.7 list Package Version ------------------...
0
votes
2answers
23 views

How to print SSID only?

While I working on a script I need to print available SSID only. I tried this: sudo iwlist wlp2s0 scan | grep ESSID I got output like this: ESSID:"CoreFragment_5G" ...
0
votes
1answer
20 views

Tmux: automatically run commands in the event of creating new pane or window

I have fixed a, b, c sessions - their name won't be changed and already auto created when I start tmux. I'd like to auto run a command in the event of creating new pane or new window in a session ...
1
vote
3answers
52 views

Shell: only double quote on test -n/-z? [duplicate]

In case of test -e for example: VAR="<this is a file path: /path/to/file/or/dir" test -e $VAR && do_something || do_anotherthing Question: Should I use "$VAR" here?, here I don't like ...
0
votes
1answer
34 views

Pipe file containing list of images to sxiv and reflect changes immediadly

Suppose I have a file images.txt which contains for example image1.jpg image2.jpg image3.jpg Then I pipe the images.txt to sxiv and I want that the thumbnail view reflects the changes immediately. ...
2
votes
2answers
243 views

Bash: Timer in while loop

I have a while loop in my script which waits for the connection get online and then continues. #!/bin/sh while ! ping -c1 $1 &>/dev/null do echo "Ping Fail - `date`" done echo "Host ...
4
votes
1answer
234 views

Is it possible to check if a specific process is sleeping or running?

I've created the following script on Ubuntu that can pause and start a specific process: #!/bin/bash loopProcess () { COUNTER=0 while [ true ]; do echo $COUNTER sleep 1 let ...
1
vote
2answers
47 views

How to start a new column after every nth row?

I have a file (comma separated) on a Linux system with 3 columns. I want to start new column after every 4th row. Input: col1,col2,col3 1,disease1,high 1,disease2,low 1,disease3,high col1,col2,...
0
votes
0answers
24 views

Creating Plain Text MAN Pages: Removing overstrike characters [duplicate]

I want to create plain text files of certain man pages such as the "ls" command. Simply performing a man ls > ls.txt, and then running file ls.txt will inform me that this is full of 'ASCII text, ...
0
votes
0answers
11 views

Opening multiple console tabs executing a different task in each from a shell script?

For a script performing multiple actions I want to execute certain actions in newly created console tabs. The current script is like this qdbus $KONSOLE_DBUS_SERVICE $KONSOLE_DBUS_WINDOW newSession ...
0
votes
1answer
24 views

Pass space separated arguments stored in variable to command

I've hijacked a pretty neat backup script from the internet but somewhere along the lines there is something like this going on DIRS="/home/ /var/www/html /etc" tar -czf /backup/file.tar.gz "${DIRS}"...
4
votes
2answers
102 views

Linux Mint. How to set the terminal password to be invisible?

I change to Linux Mint about 2 days ago. And I feel uncomfortable when I put the 'sudo password', because I used to see nothing and now I saw "*****".
0
votes
0answers
18 views

How do you open KVM or Whonix Gateway/Workstation in debian 9 command line?

I can start Whonix-Gateway using this command: virsh start Whonix-Gateway However, I cannot open it from the command line. How would I do that without using GUI? Further how does one open the KVM ...
0
votes
1answer
26 views

Secondary password file creation and reset

Is there any way to reset all passwords previously created when the secondary password file is enabled for the first time to ensure higher-level protection ?.
1
vote
1answer
44 views

Printf - print repeating minus symbols [duplicate]

how can I use printf to print a row of minus symbols? when I try: printf "-----------\\n" I get: bash: printf: - : invalid option printf: usage: printf [-v var] format [arguments] when I try: ...
1
vote
2answers
51 views

How to get the type of a certain dconf key?

How do I get the type of a dconf/gsettings key via command line ? I know I can visually inspect keys types and values via the gui tool dconf-editor e.g. the key num-workspaces under the schema org....
0
votes
0answers
53 views

Debian 9: synaptic package manager won't launch from command line

Every time I enter this line: sudo pkexec synaptic The synaptic package manager opens, but always followed by this error message: E: Could not open file - open (2: No such file or directory) E: ...
3
votes
3answers
219 views

Union commands after the || (OR) operator

When I write the code the way below, I am able to run several commands after the else statement: if [ "$?" -eq 0 ] then echo "OK" else echo "NOK" exit 1 ...
0
votes
0answers
17 views

Silence when capturing microphone with either arecord or sax

I am trying to run the following commands sox -t alsa default output.wav and arecord output.wav and arecord -f dat -r 60000 -D hw:0,0 -d 5 output.wav In all cases I am getting silent WAV. I ...
-1
votes
0answers
32 views

Inactive session timeout for GUI and Terminal [duplicate]

How inactivity timeout for GUI session is set for 15 min ?. Once a user's session is locked or terminated, the product must force the user to re-authenticate before continuing his or her session. ...
0
votes
3answers
60 views

Changing CSV Column Layout

Does anyone have a good solution for taking a CSV file and adjusting the column layout? So for example, I have a file with headers + data: foo,bar,baz 1,2,3 But I want to change the column layout ...
0
votes
0answers
25 views

Quickly verify a large number of domains via whois

If I do time whois google.com it takes about a second to come back with a response to if a domain is registered or not. If I do (a non-existant domain) time whois fslafdjlsadjflsjdf.com It comes ...
1
vote
1answer
26 views

Zsh: remove # - comment when pasting to terminal?

I use clipmenu to choose something to paste into terminal that running zsh as shell. Problem is that zsh will echo error when for example I paste a shell function that contains some # for comments ...
3
votes
3answers
356 views

Does AWK have similar ability as SED to find line ranges based on text in line rather than line number?

Resolution: the files were saved with CR rather than LF line breaks. Mosvy pointed this out, but only posted as a comment, rather than an answer, so I am unable to officially thank him for helping me ...
1
vote
2answers
56 views

Find all empty directories AND directories with a single type of file

I'm trying to write a bash script that delete all empty directories as well as any directory that only container the .DS_Store file that Mac generates. I can do the former pretty easily with find -...
6
votes
3answers
800 views

How can I output a command to a file, without getting a blank file on error?

I'm trying to run a command, write that to a file, and then I'm using that file for something else. The gist of what I need is: myAPICommand.exe parameters > myFile.txt The problem is that ...
9
votes
1answer
584 views

Redirecting stdout from two programs

I'm running a memory check tool (prog1) on a C++ code (prog2), both of which give me a huge and detailed output. In order to chase down some bugs I need to save this output to a file. I tried ...
3
votes
0answers
73 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 (...
1
vote
2answers
72 views

How to get value of a memory address using command?

At the memory address, 0x7fffffffeb58 of a program lies a value, I want to find out the value of the address. Is there a way to get the value just by using commands? I've tried dd but to no avail.
0
votes
0answers
14 views

Bandwidth shaper for pid

Problem As a developer, I want to shaper an app bandwidth (for example Android Studio) download or upload rate. Research I've find such utilities. Wondershaper: bandwidth shaper per interface ...
0
votes
3answers
52 views

Print only the lines that with all digits except the last one or the last two characters or the first or second characters

I have a big text file has lines with all numbers and with all letters and characters and also has lines mixed with numbers , letters and characters i want to print only the lines that have all ...
1
vote
2answers
37 views

Can wget download reveal.js image assets?

In using the wget command below, $ wget \ --recursive \ --no-clobber \ --page-requisites \ --html-extension \ --convert-links \ --restrict-file-names=windows \ --...
1
vote
1answer
41 views

Linux's command line behaviour (Ubunto/Deb) in running an executable file [duplicate]

@user-123:~$ Downloads/execfile-3.4/execfile @user-123:~$ @user-123:~$ cd Downloads/execfileparentdir-3.4/ @user-123:~/Downloads/execfileparentdir-3.4$ execfile execfile: command not found @user-123:~...