Questions tagged [command-line]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
30 views

vncserver won't run in a shell script executed with sudo

I have a shell script that installs several programs with sudo apt-get then opens vncserver, then installs more stuff. This works: #!/bin/sh vncserver >./my_script.sh But this does not work: #!...
1
vote
0answers
18 views

How to run a program and pass parameters through a shell scribt in ubuntu [duplicate]

I want to run vncserver in terminal, to automate it with several other commands I've put it inside a shell script. However, when you call vncserver for the first time, it asks you to set a password. ...
0
votes
1answer
57 views

How can I, in Terminal use Sublime Text to open a remote directory mounted by Nautilus?

I mounted a remote server's drive through Nautilus. Login as ubuntu(server account). Local user id is tianhe. I want to use sublime text CLI command (subl file_to_open) to open files on remote server....
3
votes
2answers
105 views

How to delete multiple process id of a single process?

I'm using the following code to kill all the PID's of a certain process, but its not working as expected. pgrep -f <processname> kill -9 $(pgrep -f <processname>) when there are more ...
0
votes
1answer
41 views

How to mv files one by one?

When mv is used between different storages, it first copies all files and then unlinks the source. How to mv files one by one, so that each file is unlinked after being copied, and the folder ...
0
votes
1answer
544 views

How do I fix gnome-terminal

I installed termite and set it as my default terminal using sudo update-alternatives --install /usr/bin/x-terminal-emulator x-terminal-emulator /usr/local/bin/termite 60 but decided I prefer the ...
0
votes
0answers
12 views

only displaying a webpage on 1 of two monitors

basically, i have three linux machines in a datacenter. I'd like to monitor these over netdata. My experience with Windows is better, though i do have a ubuntu machine running Plex and some other ...
2
votes
0answers
98 views

I can't player videos, run the file manager and the terminal after the update at 1 July

Here is my system information: sysinfo At July 1, there was a system message pop up reminding me to update some packages and drivers and I clicked yes. Unfortunately, after the update was finished ...
0
votes
0answers
25 views

Customizing and Automating Terminator Startup

The First Part Every time I boot my Laptop I manually open Terminator with two tabs each having three horizontal terminals. My Solution To The First Part So far I have automated the First Part ...
0
votes
0answers
63 views

Image size mysteriously becomes 0 bytes after renaming

I renamed some jpeg image files through command line and all went perfect except one thing that some images do not have thumb nail and shows 0 bytes on checking their properties but are still getting ...
0
votes
1answer
43 views

UBUNTU 16.04.6 not showing Dashboard, sidebars and menu bars

I am a regular user of Ubuntu 16.04.6. Recently, I was trying to install python3.6 and set this as default. But due some other package I had to remove this version. I uninstalled python3.6 and set ...
0
votes
0answers
36 views

CTRL+C for intr not working in terminal, only CTRL+ALT+C

On an Ubuntu 16.04 virtual machine, just installed gdm. For whatever reason CTRLC does not raise an intr in terminal. I instead have to use CTRLALTC. This was not happening before I installed gdm. ...
0
votes
0answers
31 views

How can I run executable in a different folder with a bash script?

I have a program, a.out, that will be set up in some sequence of folders, each folder gets an a.out and will produce some results in each folder. I am trying to execute these same programs in parallel....
0
votes
2answers
40 views

Is it possible to unzip documents into a directory which is created on the fly in a single command?

How can I achieve something like the following? unzip ./zipped_docs.zip ./new_folder | mkdir ./new_folder Or mkdir ./new_folder | unzip ./zipped_docs.zip ./new_folder I even tried mkdir ./...
1
vote
1answer
55 views

Why do I get a command not found message when I open a terminal?

When I run a new terminal by pressing Ctrl+Alt+T, it shows this text: Команда «rbenv» не знайдена, але може бути встановлена ​​з: sudo apt install rbenv How do I fix the problem, so that message no ...
0
votes
0answers
26 views

How to recover a deleted file from a remote server?

I deleted a file from a remote server and have no idea how to recover that. I don't have access to the system and can only use it through the terminal(via ssh).
1
vote
2answers
55 views

How to install perf on Ubuntu 18.04?

I have tried to install perf using sudo apt-get install linux-tools-$(uname -r) linux-tools-generic It gives an error saying: Reading package lists... Done Building dependency tree Reading state ...
-1
votes
0answers
41 views

Can't copy to a new partition

I'm newbie user on ubuntu 18.04.2. Last night, I made a new partition. After that, I copied files to net partition but I can't copy to the new partition. Can you advise me, how can I fix this issue?
0
votes
0answers
24 views

How to run script concatenating outputs to file and running in background?

I have the following script: #!/usr/bin/env sh set -x ( echo "Running command ls -la" && \ cd folder/path && \ ls -la ) $>> some_file 2>&1 & Pretty much ...
0
votes
0answers
21 views

Copy File from Local System to SMB share on same local system

I have created a file server to act as a simple NAS using Ubuntu Server 18.04 and Mdadm. The file /proc/mdstat is a constantly updated text file which provides the status of the RAID managed by Mdadm. ...
7
votes
2answers
750 views

Where is the read command?

I wanted to find the read command, so I did: $ which read It returns exit status 1. Why does this happen?
7
votes
2answers
171 views

grep fails to find text in this file

I cloned with git the source code of a project, and I used grep to find a word in the entire project, SchemaHandler. grep failed to find the word in this strange code file: https://github.com/...
0
votes
0answers
61 views

Script doing sed in a file and circle the output

I'm trying to make a script for the following redirect: Day 1 Dobritoiu - Palmar Gae - Icinga Petrisor - Backup Popa - Pupaza - Vargatu - Vasuica - Day ...
1
vote
1answer
77 views

cmd “./configure” not executing

I am trying to install gsl 2.5 on Ubuntu 18.04. Followed the following steps: 1. Downloaded the latest gsl pkg from http://ftpmirror.gnu.org/gsl/. Unzipped the tarball with archive manager, a folder ...
0
votes
0answers
109 views

After Ubuntu 19.04 update, sudo fails, Terminal and File app won't start

After the latest updates installed on my Lenovo ThinkPad T580 pc, I find the following problems: sudo no longer works. The following message is returned: "bash: /usr/bin/sudo: Permission denied" The "...
1
vote
1answer
29 views

CTRL-a and CTRL-e map incorrectly in tmux

I like to use command-line commands CTRL-a (beginning of line) and CTRL-e (end of line), but when I start a tmux session, these commands don't work. CTRL-key seems to be interpreted as caret ^, as in ...
2
votes
0answers
52 views

cp -l instead of cp -s does not work?

I have a folder symlink to core files and a folder with my improvements like this: core/ -> /some/distant/root/directory/core/ script_a.py special/script_b.py special/script_c.py core-improvements/ ...
1
vote
1answer
47 views

How do I remove Confluent CLI completely?

I used the following commands to install Confluent CLI to my Ubuntu system following the steps that are mentioned here. I executed the following commands consecutively: wget -qO - https://packages....
1
vote
3answers
72 views

Renaming multiple files at once, with the same extension [duplicate]

I'm currently in a situation, where I need to rename a bunch of files, inside different folders, with the same extension (SRT). Currently, my directory "setup" is like this: This is a folder (2000) ...
0
votes
0answers
28 views

Renaming folders and files in 18.04 no longer works in Cinnamon

Fresh install of 18.04...only a week or so old. Installed Cinnamon as the desktop. Two days ago, was copying hundreds of pictures from an SD card into several new directories under 'Pictures'. ...
1
vote
1answer
57 views

youtube-dl: Use different output format if downloading a playlist

I am using youtube-dl to mostly download channels or playlists. However, if it is a playlist I do not want to use the same output template as if it were a channel. Is there a way to achieve this? # ...
0
votes
1answer
30 views

cli can't find folder that is right there

I'll admit that i'm a noob at ubuntu, i only have it installed for 2 days. i wanted to delete the stacer config folder through the terminal but it says it can't find it, even when i typed rmdir with ...
0
votes
1answer
42 views

last login shell script

So I used google to figure out that last -1 -R -s yesterday -t today gets me this: and from what I understand awk -FS '{print $2} should just get me this part of the last command when it's piped in
1
vote
1answer
45 views

Set Console number of Lines

The question is about the console you get by hitting CtrlAltFx (F2 for instance). Not the Terminal from a gnome (...) session. Whatever the size of the font I choose, the bottom line is always ...
2
votes
0answers
46 views

watch --beep doesn't work

I read watch command's manual page, found -b or --beep: -b, --beep Beep if command has a non-zero exit. So I did: $ watch --beep ls /root Using a non-root account and it doesn't make a ...
0
votes
0answers
63 views

What is the package name for “ls” command? [duplicate]

I was reading about packages, and I wondered what are package names for commands like "ls" and "echo"? These commands were installed on every Linux machine I've worked with, and I don't know which ...
1
vote
1answer
43 views

watch and trigger a ffmpeg command only on new files added to a folder

Okay so I've written a function which loops through all files in a folder (only to a depth of 1) and compresses them to a smaller file size. EDIT: CHECK MY EDIT AT THE BOTTOM function ...
1
vote
1answer
19 views

Execute command but singe and double quotations already used

I have two commands here. The first command works in my php.ini but the second one will not. The only difference between the commands is "XAMPPEmails" VS "XAMPP Emails" with a space. I want to have ...
1
vote
1answer
34 views

Find every word, otherwise a message from grep should appear

I have a file with 5 numeric no. Like below Line 1 - 6 rahul Line 2 - 4 anil Line 3 - 8 ravi Line 4 - 9 sagar Line 5 - 3 pravin Here if I'm using grep '8\|9\|2' file >file1.txt It will redirect ...
1
vote
1answer
44 views

Why in any installation prompt (Y/n) the 'Y' is in Uppercase and the 'n' in lowercase? [duplicate]

The question itself is self explanatory. As another query I would like to know if it's possible to replace the 'Y' option with 'Enter' keystroke.
0
votes
4answers
121 views

A condition with multiple commands

Is it possible to do something like this? if rsync $folder/coopshop/prod $folder2/coopshop rsync $folder/coopweb/prod $folder2/coopweb rsync $folder/unihobbyshop/shop $folder2/unihobbyshop rsync $...
-4
votes
0answers
38 views

I am trying to install openbts, but I keep getting this error: (dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2)

# checking for a supported radio type # - found # single component specified # - found, building open bts # checking for a compatible build host # - fully supported host detected: ...
0
votes
0answers
24 views

I can only open terminal on ubuntu 18.04 in a specific way

A while ago my terminal stopped coming up when I pressed ctrl-alt-T. Then today the terminal stopped coming up when I click on the terminanl app on the dock. I use ubuntu 18.04, a lot of python and ...
1
vote
1answer
43 views

How to start a systemd service with complex arguments?

I want to stream video from a Raspberry Pi with a USB camera using mjpg-streamer. Here is the commandline to start it from a bash shell: ./mjpg_streamer -i "./input_uvc.so" -o "./output_http.so -w ./...
2
votes
1answer
37 views

Replace source word with containing /(forward slash) to destination word in VI editor command window

I'm facing problem while cmake compilation wherein, there are thousands of /root/repo/ are there & I want to replace with /repo/ . Because of / in the source word the command :%s/srcWrd/dstwrd/gc ...
1
vote
0answers
29 views

error on installing curl in ubuntu 16

$ sudo apt install curl Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: curl 0 upgraded, 1 newly ...
-1
votes
1answer
60 views

does it matter if its internal or external usb hdd? [duplicate]

Can i install ubuntu(any flavor at that) onto am external hdd and will it run normally? If so what are the procedures and how do i do it? I wanted to install into a usb external hdd
0
votes
0answers
48 views

bash exit with most of the native commands

Whenever I run a command like "autocomplete (tab)", grep, which, etc, bash window is closed without any warning. Before this happens, I was playing with the trap command to create a script to handle ...
1
vote
0answers
29 views

Mount Hidden From Root User

I have a bizarre issue with mount. The root user cannot see a mount that was created by PHP/Apache running a bash script as root. Steps to recreate the issue: Configure fstab for mount point: vim /...
0
votes
1answer
30 views

How do I add a TXT or A record using unbound?

I am currently following this tutorial. The author says we can add a TXT record on the local DNS resolver. But can I please know how do I do that? How do I add a TXT or A record on the local server (...