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]

Questions about using the command-line interface (CLI).

0
votes
0answers
8 views

How to resize a partition with lvm? [duplicate]

I installed Ubuntu on a 500gb external disk using all the space, how can I resize it? (lvm present)
0
votes
0answers
16 views

How do we copy file which only are named as hash format

I have a list a file in a directory1 and I need to copy the only hash file existing to another directory2. How can I do it using a script? for any other file with a normal name I can do it but what ...
0
votes
1answer
29 views

No such file or directory? but it exists

Im installing SquirrelMail in Ubuntu Server 18.04. I got it from here: wget https://sourceforge.net/projects/squirrelmail/files/stable/1.4.22/squirrelmail-webmail-1.4.22.zip Then I unzipped using ...
2
votes
2answers
28 views

How can I keep the terminal output always at the beginning?

I have large output from a python script that clear the terminal and print again, but the scrollbar of terminal always is in the bottom. Is it possible to fix the scrollbar to the top so I could ...
0
votes
1answer
32 views

How do I make my bash script output data correctly?

I'm struggling with some code I've been writing all day and I'm at a loss, basically, what the code is supposed to do is output a .csv file with all the data in the second to last echo statement, ...
0
votes
2answers
35 views

Run a command on start up, please [duplicate]

I install Ubuntu on my notebook bought in USA but I'm from Brazil, the problem is, because of the keyboard model, I have to run this command every time I turn on my system: "setxkbmap -model abnt2 -...
1
vote
1answer
27 views

.bashrc and .bash_profile not created with adduser but created with useradd

I am adding a user named 'test' in my Ubuntu 18.04 server. When I add the user using adduser, like this: sudo adduser --system --group test --shell /bin/bash all goes well, I can login fine, but ....
1
vote
1answer
55 views

How to rename a .txt file in chronological order?

Does anyone know how to write a script to rename a .txt file for it do count up in chronological order? Ex I need it to start at C1_1+100, C1_1+200, C1_1+300... all the way to +900 and then roll over ...
6
votes
2answers
282 views

How can I extract records with a column in common?

I have two tables with different numbers of columns and rows. I want to find rows using a common column (column B is in common). Here is an example. Could you please help? file1.txt A B C D a ...
1
vote
2answers
37 views

An option is not seeing an argument (that is a variable) in bash, please help? [duplicate]

#!/bin/bash counter=2 while [ $counter -lt 19 ] do username= head -n $counter ./user_sheet.csv | tail -n 1 | cut -d ';' -f1 psswd= head -n $counter ./user_sheet.csv | tail -n 1 | ...
0
votes
1answer
26 views

How can I get the path of the file being downloaded by aria2?

I want to write a bash function to both start downloading a file and open it in a video player; I don't know how to get the path of the file being downloaded though: function dl-and-stream() { ...
3
votes
1answer
84 views

Zenity: get selected filename without its path

I need zenity to put a selected filename into a variable without its path. What I have now is file_to_copy="$(zenity --file-selection --title='Select a File')" echo $file_to_copy then prints /home/...
5
votes
2answers
99 views

Search folder, find and copy files to new folder corresponding file ending [duplicate]

I have manage to grab some data of a couple of hdd with photorec, but I can't figure out how the files are saved, and it not very convenient searching in those recup_dir.*. So my thought is to ...
-1
votes
1answer
79 views

Different outputs when using break in bash

I wrote a simple script: for DIR in /etc/*; do if [ "$DIR" == "/etc/dhcp" ]; then echo $DIR break fi done This works correctly but if I use break after fi it doesn't generate ...
0
votes
0answers
33 views

Error: system is running in low-graphics mode

I installed Ubuntu in my SSD with my desktop and It worked well. Then I put it on my laptop and I got the error system is running in low-graphics mode. The error prompt before I reach the Ubuntu login ...
0
votes
1answer
58 views

What is the difference between cut’s -b and -c option?

I've searched online for examples, went through the reference manual of the cut command and tested it myself and remain unsure about the -b flag. There aren't any clear examples as to how the cut -b ...
0
votes
0answers
12 views

bcl2fastq2 library installation error

Image of message i get when trying to install bcl2fastq2 library to use with the Cellranger 3.0.1 software So I already installed all dependencies and checked them in terminal, but still while trying ...
0
votes
0answers
7 views

Unable to install NotifyOSD Config on Ubuntu 18.04

I am trying to install NotifyOSD Config on Ubuntu 18.04 but am receiving errors. See below. Any help is appreciated. I am following the steps here - https://launchpad.net/notifyconf The output of ...
0
votes
0answers
54 views

Ubuntu 16.04.3 LTS - CLI login loop, how to exit?

I've had a look around the net, and although I can find answers to similar problems, I can't find an answer to the one I'm facing. I have no GUI/Desktop/Space issues, it is a standalone server ...
-1
votes
0answers
39 views

How restart ubuntu 16.04 as administrator? [duplicate]

my ubuntu 16.04 os crashed, I tried to restore it and there were some failures, now whenever I boot or restart, it only gives me a temporary guest access. How do I solve this problem?
-1
votes
0answers
25 views

Ubuntu 18.04 terminal ssh and keypressed

I use Ubuntu desktop and sometimes when I use a ssh connection in terminal to a server. When I switch from terminal, to other application, ex. Gedit, Nautilus etc, and come back to terminal, then I ...
0
votes
1answer
52 views

Open terminal and run command, from the command line [duplicate]

I am looking for a way to launch a terminal session from the command line on Ubuntu, something like this: #/usr/bin/env bash terminal -c 'node server.js' if there is some cross-platform tool that ...
3
votes
1answer
106 views

command line tool for pdf editing

I have a PDF that has my name as an obnoxious watermark through out a rather long PDF file. I tried replacing the text in libreoffice draw with blanks, but while my name does appear as text, the find ...
6
votes
2answers
59 views

Sed script crashing on big file

I have a shell script which is in essence a sed script with some checks. The goal of the script is to convert the header of a file from. &FCI NORB=280, NELEC=78, MS2=0, UHF=.FALSE., ORBSYM=1,1,1,...
0
votes
2answers
87 views

use sed to replace each white space with a backslash

just want to escape spaces in windows filepath. I'm trying this echo "111 1111 "| sed -e "s/[[:space:]]/\\ /g" that only match spaces but do not replace.
0
votes
0answers
50 views

Problem with BASH file (bad interpreter: No such file or directory) [on hold]

Apparently someone changed the bash file paths related to python. Showing these messages: $ type -a python bash: type: python: not found (python 2.7; python 3 & python 3.7 are installed) $ aws ...
-1
votes
0answers
25 views

What is the color code for the output of ls? [duplicate]

What is the color code for the ls output? I know, for example, that dark blue (not sky blue) means that it is a directory. What do red, sky blue, green and the other colors in the output of ls mean?
-1
votes
0answers
52 views

Color the prompt and make changes permanent [duplicate]

I want to change the color of the prompt. I changed the bashrc file and saved the changes using nano . But the changes are not permanent. They are lost when I close the terminal. I tried solutions ...
2
votes
2answers
40 views

How can I compile, run and decompile C# code in Ubuntu terminal?

I have a C# code which I need to compile, execute and decompile using the terminal. How can I do so?
1
vote
0answers
375 views

Unable to run Autokey Ubuntu 18.04

I am relatively new to Linux/Ubuntu (so please take it easy on me) and I am trying to install Autokey to use the text expansion functionality. I have tried installing it from the instructions on the ...
0
votes
2answers
77 views

New NextCloud installation requires change but I'm not sure where to run this line of code

I just installed NextCloud 15 on a new installation of Ubuntu 16.04.5 LTS. The welcome page shows this: Some columns in the database are missing a conversion to big int. Due to the fact that ...
1
vote
2answers
55 views

How to pass strings stored in variables to find command

I need to pass strings stored in a variable to a find command string. What I do: s="\( ! -path \"/path/to/1/Recycle Bin\" \) -or" s="${s} \( ! -path \"/path/to/2/Recycle Bin\" \)" exec=$(find "/path/...
3
votes
2answers
198 views

whereis returns different path to which

I use the command whereis rm $ whereis rm /bin/rm Then I try which rm $ which rm /usr/local/opt/coreutils/libexec/gnubin/rm The results are different... so which rm will be called when I run a ...
0
votes
0answers
22 views

What is /dev/null? [duplicate]

I just changed my Windows OS to Ubuntu and want to understand how to use it effectively. I saw commands where a user sends files to /dev/null. What goes after moving some file to /dev/null? What are ...
0
votes
0answers
23 views

Is it possible for me to deploy Ubuntu studio tools in Ubuntu Canonical 18.04LTS?

I have a powerful machine that is a laptop with Nvidia Gforce graphics, 1TB HDD, 16gigabytes RAM and an i5 processor. I have already installed Ubuntu 18.04 LTS, and since I don't have another machine ...
0
votes
0answers
13 views

Remote SSH command with export will reset environment variable? [duplicate]

I'm using remote ssh command with "export" to add environment variable, like this: $ ssh jenkins@test "export PATH=${PATH}:/opt/xxx; env" And the PATH listed in env is PATH=/home/administrator/bin:/...
0
votes
0answers
8 views

Malformed line #2 in source list (/etc/apt/sources.list.d/lutris.list) [duplicate]

cneifert@cneifert-K52F:~$ sudo apt install dhelp [sudo] password for cneifert: E: Malformed line 2 in source list /etc/apt/sources.list.d/lutris.list (type) E: The list of sources could not be read. ...
2
votes
1answer
60 views

How do I remove another computer which has remote access to my laptop?

I visited a friend recently and he uploaded Linux on my laptop. He uploaded many programs from his laptop unto mine using a terminal. To do this he had to add a very long code from his laptop onto my ...
3
votes
0answers
43 views

Get ok message when installing deb with apt in terminal (from context menu or click)

I find apt in terminal as the best way to install a program from a deb package. As I prefer it to other gui tools, I want that in the context menu for deb files or as a launcher among applications in ...
7
votes
2answers
551 views

Given the result of grep -n, how can I open vim in that specific line? (using only keyboard)

When I run grep "keyword" -n and get the following list of results: a/b/c:10: keyword a/b/c:70: keyword a/b/d:50: keyword How can I open one of the files (say the 2nd in list) in the line ...
0
votes
1answer
45 views

Terminal can't be launched in GUI

When I click on terminal it shows in the menu but after few seconds, it disappears. I have no idea how to make it work. By the way, since the GUI installed this terminal never working. Is it related ...
0
votes
0answers
21 views

How to do one to one mapping in shell script? [duplicate]

Dear Ubuntu Help desk, I am having two arrays namely X and Y of size 1:10, I need to read each values from two arrays [X(1),Y(1)] and [X(2),Y(2)] likewise. Kindly help me out how to write a shell ...
1
vote
0answers
28 views

How to remove chapters from mkv metadata

How do you remove chapters from mkv metadata on command line? Can ffpmeg be used for this?
0
votes
0answers
10 views

How to reconnect to a previously disconnected PTY? [duplicate]

Sometime, while running long-time or interactive commands (apt-get, wget, make…) through SSH, my connection is dropped for some reason (the router lost the connection, or the WiFi quickly disconnects/...
0
votes
0answers
36 views

C compiler cannot create executables / icc

I'm trying to build open3dqsar using intel-mkl and when running ./configure CC=icc --with-intel-mkl && make && make install I get checking for a BSD-compatible install... /usr/bin/...
0
votes
0answers
34 views

How to use telnet client in Ubuntu 18.04 terminal?

I read book about programming and networks.. Found this example: As written in this book, after last <Enter> we must receive page raw HTML code.. I upload small script to my host to minimize ...
0
votes
0answers
15 views

CHOWN command applied on /usr/lib by mistake [duplicate]

By mistake, I executed below commands sudo chown -R $USER /usr/lib So now it seems /usr/lib ownership is changed and sudo command is not working. Getting following error on terminal sudo: error ...
1
vote
0answers
63 views

Ctrl+Alt+F1 is not working anymore after installing VMware View Agent

I have successfully installed GUI/Python/VMware View Agent on one Ubuntu VM. But the second day after I powered it on, Ctrl+Alt+F1 was not working any more. And I can't use terminal from GUI as well. ...
0
votes
0answers
23 views

How to put special characters with lynx script?

I'm writing a script to send any code to a page by making the lynx to type it completely but I don't know how to make it print some special characters: '*' , key * doesn't work '\t', key <tab> ...
1
vote
0answers
41 views

How should I call the result after I run a code in ubuntu terminal?

I am trying to run a SageMath code on AWS through the Ubuntu terminal. I have successfully run the code. Now I want to see the computation results without abusing "print". The results are saved in ...