Questions tagged [command-line]

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

Filter by
Sorted by
Tagged with
-1
votes
0answers
29 views

Terminal not starting properly

I have a Mac running OS Mojave version 10.14.6. I was adding some PATH to run ethereum geth command and now my terminal is not starting properly, it is always starting with the below message: Last ...
0
votes
1answer
16 views

How to restore timezone from RHEL 5.x to RHEL 7.x?

We have scripts to reinstall RHEL 5.x to RHEL 7.x and install our application, but I need to update timezone according to old one. So how to restore timezone from RHEL 5.x to RHEL 7.x using /etc/...
0
votes
0answers
32 views

Bash, generate csv to xls with some formatting [on hold]

Is possible generate csv to xls with some simple formatting in terminal? For example I have first column with pages, so I need generate xls with conditions like this. If column1 is 1 then background ...
0
votes
0answers
19 views

Keeps terminating while using screen with running run.sh file

I'm a newbie on using screen. I'm trying to run my run.sh file from a docker container with screen command. However, it keeps automatically terminating when I typed the below command. screen -S ...
1
vote
3answers
31 views

How to find name of the command locally [duplicate]

I use Linux not Windows for several years at home and consider using command line quicker way to do things. However sometimes I could not easily recall name of needed command, for example instead of ...
0
votes
0answers
41 views

need help with osx command line behavior

For some reason, when I run a command in the osx terminal, the cursor is not automatically moved to a new line. Does anyone know how to get the cursor to move down to a new line after every command ...
0
votes
0answers
20 views

is there a way to extract embedded or muxed subtitles in an mkv media file without harming the media file

I have a media file which has an embedded subtitle file with it. I want the subtitle to be extracted or to be more precise a copy of the subtitle which is embedded in the media file. There are some ...
3
votes
2answers
349 views

How to convert 2019-08-15 date format to August 15, 2019 in the command line?

Given a bash variable with the value 2019-08-15, is there some utility that can convert that date to the format August 15, 2019?
1
vote
1answer
21 views

How can I extract files with specific extension from a tar file's root directory?

I have a tar file. That's what its structure looks like: -images.tar.gz -folder_0_image_1.jpg -folder_0_image_2.jpg -folder_0_image_3.png -... -folder_1 -folder_1_image_1.jpg ...
0
votes
2answers
45 views

How does one sort dates in a text file?

It's 14.08.2019, there is a text file that contains a list of dates (dd.mm.yyyy): 30.07.2018 14.08.2019 18.08.2019 20.08.2019 01.01.2020 The dates in the list are deadlines. What the output should ...
4
votes
1answer
40 views

Rename files and directories with French characters

I use the following command on Ubuntu with rename (installed with sudo apt-get rename) to rename all files which have the given characters in regex: find . -execdir rename 's/[^A-Za-z0-9_.@+,#!?:&...
-4
votes
0answers
14 views

How do I get pgadmin4 to work on my localhost browser? I am getting the following error: [on hold]

I am getting the following error: "penguin.linux.test refused to connect."
1
vote
2answers
36 views

Kill script, but allow currently executing program to exit

I have a bash script runs a command in an infinite while loop. The script looks something like: while : do python3 my_program.py done Is there a simple way to terminate this while loop from the ...
1
vote
1answer
24 views

Adding tags to mp3s for use in music players [duplicate]

I'm hoping this is the correct place to ask. Basically, I'm using cmus and have a little bash script to automate downloading, renaming and moving a mp3. However, cmus just lists the song name as ...
1
vote
1answer
45 views

How to clear all (and only) my program's output from the terminal

I know I could use something like ncurses, but I don't want to include that dependency in my project. I'm looking for a way to clear all the output my program generated at a certain point, so I can ...
1
vote
1answer
27 views

How to parse strings from a file in multiple other files?

I am trying to grep a list of strings listed in 7253.txt which looks like this: rs11078372 rs1124961 rs11651880 rs11659047 rs1736209 using: grep -o -f 7253.txt *.logistic > result.txt from ...
1
vote
0answers
16 views

How to increase the duration of the transition effect between multiple video cuts in this ffmpeg `-filter_complex` command

As instructed in Gyan's solution to this question, ffmpeg can be used to interleave two audio/video inputs with a lapse dissolve transition. For example, this command will divide each input into cut ...
0
votes
1answer
19 views

Tool to determine MP3 actual quality

I am looking for a CLI tool that will give me an output of the frequency range of an MP3 file, like Spek does, but without the image file. I need to this to analyse a large library of MP3 files to ...
0
votes
2answers
33 views

How to convert space separated file into tab separated? [closed]

my file pheno_Mt.txt looks like this: IID pheno 1000017 -9 1000025 -9 1000038 1 1000042 -9 1000056 -9 So it is space separated and I would like to convert it into tab separated. I tried: cat ...
-2
votes
0answers
35 views

should this time behaviour be considered a bug or a feature in ls -l ? (observed in gnu coreutils 8.23) [duplicate]

With the ls command, when you display the time for a file in the "normal" format (ls -l), you get the time for files from the current year and the year for other years drwxr-xr-x 2 xxxx xxxx 4096 ...
1
vote
1answer
34 views

Full path of running processes in Android?

I have a rooted install of Android on my phone and a terminal emulator. I can run su and then commands like ps and top, however they only show me things like com.android.deskclock for running apps, ...
1
vote
1answer
11 views

IBMs Integrated Virtualization Manager. CLI equivalent

For the next weeks I need to fill in for local sysdadmin and I need admin some VMs on IBM's VM architecture, VIOS I believe it called. There is this web interface called Integrated Virtualization ...
0
votes
1answer
27 views

Locate doesn't work

System: Linux Mint 19.1 Tessa, edition: Cinnamon Got a problem with a locate command. I created test.txt file on a desktop. After that I did: sudo updatedb However locate test.txt -i still ...
0
votes
0answers
53 views

“az vm list | jq” fails with “parse error”

I'm trying to pipe the output of a command to jq but I get a parse error. The command I try to execute is az vm list | jq. When I run az vm list I get a JSON array printed out: [ { ... } { ... } ] ...
-1
votes
1answer
31 views

Make shell interpret operators enclosed in single-quotes [closed]

I have two commands built using the logical operator &&. The two commands are enclosed in single-quotes because they are to be passed as a command to root: $ su -c 'sed -i '1i TEXT' file1.txt ...
-1
votes
0answers
27 views

I am new to running more complex commands on the command line and need help figuring out what is going wrong here [migrated]

I want to run a one-liner to enable me to get the hash of a string and eventually compare it to a hash I can just copy at the end of the command later. I'm confident I can figure out how to do the ...
18
votes
6answers
2k views

Is there a command-line tool for converting html files to pdf? [duplicate]

I would like to install a command line tool within a Docker image in order to quickly convert *html files into *pdf files. I am surprised there is not a Unix tool to do something like this.
0
votes
0answers
40 views

Different output between command line and crontab

I'm trying to send an alert whenever a connection between 2 different machines gets lost. Basically I need to see from PC N°2 if there is an established connection from PC N°4 to port 6031 on PC N°5. ...
0
votes
1answer
41 views

Install Let's Encrypt SSL certificate on Oracle Linux Server

I am trying to install a Let's Encrypt certificate on a Oracle Linux Server 7.6. Since the server does not have a public IP, I had to validate via DNS.I followed the instructions here https://github....
1
vote
3answers
40 views

Suppress rsync warnings but not errors

I'm using rsync to transfer from one server to another using an account that has no home directory: rsync user@server:source target Password: Could not chdir to home directory /dev/null: Not a ...
3
votes
3answers
39 views

How to save command as well as output of that command to a file [duplicate]

Hi I want to save both output of a command and the command that has been run to create the output into the same single file. I understand either of *some_command* > file.txt *some_command* | ...
2
votes
5answers
117 views

Running Linux on Windows at school without actually installing linux

The school here wants to teach basic Linux and Unix things like terminal and CLI. The problem is, installing things is not allowed. So, dual boot is out of the question. Just running windows 8. Next, ...
-4
votes
1answer
38 views

Fedora Command Line [on hold]

A few questions about commands relating to a removable device. What sort of command can locate the device file used by a USB? As in the directory it creates to open the actual USB. How do I mount a ...
0
votes
0answers
13 views

Installed zsteg with gem but command isn't recognised

I installed zsteg with gem with the line "sudo gem install zsteg" and everything installed perfectly, but when I type "zsteg" or any valid command that the zsteg documentation says should work all I ...
2
votes
4answers
430 views

How to prevent command substitution on the command line?

I find that when writing text as input to another program, any command substitutions in double quotes within the intended text are interpreted and expanded by the shell The links in the answer here ...
1
vote
1answer
36 views

Fedora terminal script to create a directory and copy a file to directory

I need help to write a script to create a directory, so far I have mkdir ./directory. This would create a folder called Directory, but I need to make it ask if the user wants to copy a file called ...
2
votes
2answers
73 views

Move the cursor directly to `<keyword>` in a long command line

I often find myself in a long command-line, where it can be a pain to navigate to a specific location in the middle by means of Left-Arrow, Right-Arrow, Alt+B, Alt+F etc. I know that using tmux, I ...
2
votes
1answer
34 views

curl in non-interactive mode

I am trying to automate stuff which includes installing rust through curl https://sh.rustup.rs -sSf | sh . This is interactive and queries for user-input to choose from i.e. "1" "2" or "3". I am ...
9
votes
1answer
579 views

Explain why watch 'jobs' does not work but watch 'ps' work?

jobs is my favorite command to see my codes which are running in the background. In order to check for them dynamically, I tend to type watch 'jobs' which does not display anything. However watch '...
1
vote
1answer
26 views

Check if an application is running and is visible to the user

I need to know if an application is running and is visible to the user or if is running but minimized (not visible to the user) I am able to get the pid of my application with pgrep studio but I ...
0
votes
3answers
58 views

Bash, get links from pdf

Os ubuntu. Need to get links or more data (for example binding layer from QuarkXPress application) from pdf to text, in terminal. Tried pdftotext, but seems links are not exported, pdfgrep is the ...
0
votes
0answers
14 views

CLI or ncurses tool for browsing local network?

I have a console-only SSH-based pivot box inside a remote location. I want a console or ncurses-based tool that shows me active real-time information on which hosts are up. IP, hostname, etc. ...
0
votes
2answers
51 views

Piped greps for looking inside files

(self-migrated from ask-ubuntu because it's linux-related, not ubuntu, and my os isn't ubuntu) I'm trying to make a grep that looks like this: grep -r 2019 | grep -riv FAILED | grep -rl DSL I want ...
2
votes
3answers
136 views

How to delete hibernation files on deb based system

I have a Kali VM that is seized up, during booting it says "resuming from hibernation" and does not progress. There is no disk i/o. I am wondering if it is possible to completely delete the files ...
0
votes
2answers
69 views

How to save the progress of the “find” command?

I have big directory tree of files. I often use the find command to locate something in that tree. The first time after a reboot it takes some time, but subsequent uses are almost instant. Obviously ...
0
votes
0answers
30 views

Search all disk images for a file name?

When backing up many SD card images onto a large HDD, I am not sure whether one SD card is already included or not. I would like to search all the images for a file name saved on that card, e.g. ...
7
votes
3answers
1k views

Quickest way to move a line in a text file before another line in a text file?

I have the line number 55 in a text file which I want to move just before line number 23 in the same text file. I know that you can move lines up by a certain number of lines 1, 2 but is it possible ...
0
votes
2answers
42 views

Using command line in Fedora to print/echo certain lines in a file [duplicate]

For Fedora OS I'm still learning here, but I need help to insert a command for example "XXX" to say that I have a file that contains 1000 lines of single product names. I need to write a command to ...
3
votes
2answers
61 views

How do I add a new mime type for file -i?

On our server, we have some issues with mime types. I need to add the mime type for Microsoft Publisher files, so that file -b -i theFile.pub prints application/x-mspublisher to the command line. I ...
2
votes
1answer
347 views

/bin/sh: 0: Can't open sh

I'm trying to run a simple C program. #include <stdio.h> #include <unistd.h> extern char** environ; int main(){ // execl("/bin/sh","sh","-c","/bin/ls -l",(char *) NULL); char* argv[...