Questions tagged [command-line]

This tag is for questions that are about using the command-line interface (CLI), including the use of standard command-line tools and shell commands. However, for questions that are specific to each shell (like Bash, ZSH etc.), use the tag of that particular shell as well.

Filter by
Sorted by
Tagged with
1 vote
1 answer
119 views

How do I get values of certain row by column names?

This is the output for the command aws iam get-credential-report --query 'Content' --output text | base64 -d from this output how to grep the values of access_key_1_active and ...
1 vote
1 answer
330 views

Looking for a tool that finds quickly the duplicates of a known file

I have up to now used the tool fdupes to find all the duplicates of a file but this doesn't seem to work. I tried to do : fdupes -r ~/Large_directory file_to_find.txt Firstly I have, just after ...
1 vote
1 answer
2k views

How can I unpack a tar file into a blank disk image?

I'm trying to unpack a tar file in to a disk image which I created. I have no idea how to do it, Since the disk image .img is not a directory. I have already mounted the disk image. What should I do ...
0 votes
1 answer
48 views

How can I run this command succesfully

I need to run the following command to run a program in Ubuntu. Java -Dprism.forceGPU=true -jar quantumVITAS-0.1.0.jar I got an error "Java not found" I have downloaded the last version of ...
1 vote
0 answers
43 views

After I turned off my Laptop and then tried to turn it on the next day, Ubuntu doesn't boot correctly

Everything worked just fine but after I wanted to turn on my Laptop (Dual-Boot) again Ubuntu is just showing me this: What can I do to fix it? Btw, I'm new to Ubuntu, that's my first problem. Edit: ...
2 votes
2 answers
2k views

Create and append key value pairs to a file of JSON objects with a regex of each JSON object value

I have a big file that contains json objects each object in a new line. File example {"Name" :"%Hana-29-Mrs-Smith","job":"engineer"} {"Name" :"%...
-1 votes
2 answers
1k views

Execute a bash file by double clicking

Instead of following the steps at https://www.xp-pen.com/faq-56-210.html, I want to be able to double click the bash file and run the software. I followed the steps in https://www.youtube.com/watch?v=...
0 votes
1 answer
221 views

Terminal Errors in Kubuntu 20.04

I am getting a strange printout of what appears to be errors in my terminal when I load the app in Kubuntu 20.04. I first noticed it while using Hyper Terminal, but then I tried Konsole and got the ...
2 votes
1 answer
1k views

Batch FFmpeg encoding - Variable CRF based on Bitrate

I use ffmpeg in a VM instance running Ubuntu to encode some videos I downloaded from various streaming sites to HEVC. Currently I use a bash script to convert all these files in a directory. Overall ...
0 votes
0 answers
194 views

Can't save output of particular command in particular environment (cron)

My crontab is not producing logs for a particular command I'm using to monitor my network; other commands work fine. * * * * * /usr/bin/COMMAND opt1 opt2 >> /home/pi/LOG.log 2>&1 The ...
3 votes
2 answers
12k views

How to run a command to before starting systemctl service

I am creating a systemctl service for a python script which needs openvino environment initialized. Before running the python script, we have to initialize the openvino environment and have to run the ...
2 votes
2 answers
614 views

What is the difference between systemctl start [service] and systemctl start [service].service?

With the commands systemctl start apache2 and systemctl start apache2.service, is there any difference between them? What does the .service mean? Does it do anything that systemctl start apache2 does ...
0 votes
3 answers
857 views

Open a folder based on the date

Using command line is it possible to open a dynamic folder based on today's date? Command line example: cd /folderstatic/20200722/ where 20200722 is the dynamic command.
0 votes
1 answer
377 views

Having trouble transferring file to a new folder

I get this message when I try moving a file to a new folder sudo mv bios.rom usr/share/higan/GameBoyAdvance.sys mv: cannot move 'bios.rom' to 'usr/share/higan/GameBoyAdvance.sys': no such file or ...
1 vote
2 answers
6k views

How do I search in multiple files with "cat"? [duplicate]

What I want is to find within a directory all the files containing a match and when it finds the match it shows the file where that match was found. example cat * | grep password: Here it will show ...
7 votes
3 answers
4k views

Software for Imgur image upload

Is there any software that can help me upload images directly to imgur.com? Command line applications would be preferable.
6 votes
3 answers
16k views

How to copy complete content on terminal to a text file using commands ?(Not for one output but everything on terminal)

How to copy complete content on terminal to a text file using commands .
1 vote
0 answers
4k views

Network Manager couldn't reserve IP configuration

I'm using Ubuntu 20.04 LTS I connected to Ethernet to install Network Manager using the following command sudo apt-get install network-manager All went perfectly with no errors. I then start Network ...
0 votes
2 answers
5k views

How to erase Bash shell command history [duplicate]

I'd like to clear recent inputs in terminal not cls or clear but when you press up or down. How do I clear this list so that when I rename sudo to nodood or something you cannot press up to view the ...
2 votes
1 answer
663 views

Batch rename of video files after finding its resolution height

Trying my first script, not going smoothly. Maybe someone knows of a program or can help point in the right direction. I want to sequentially find a large archive of video files resolutions - height ...
0 votes
1 answer
91 views

List of installed softwares (from newest to oldest) with apt command on Ubuntu 20.04

I'm looking for a way to show the list of the installed softwares ordered from newest to oldest. So far I know only how to show the list of installed softwares: apt list --installed or: apt list -i
0 votes
1 answer
720 views

Command not found + white terminal

I'm pretty new on ubuntu and I encounter a pretty problematic issue. I set it up correctly and everything was working but since this morning, I have pretty big issues with the bash terminal. First of ...
0 votes
1 answer
591 views

How to grep a identical word in json file format

Here is my command: aws logs describe-metric-filters --log-group-name mahi | jq '.metricFilters[].metricTransformations' | grep "metricName" output: "metricName": "APIMetric&...
0 votes
2 answers
39 views

Extract out lines with "s__" into a new file together with first two lines of the file

I have a file from where I want to extract the first two lines (starting with "ID" and "#SampleID") along with all the lines that contain "s__" in that line. And, want to ...
2 votes
1 answer
469 views

What command does Ctrl+C execute?

I want to create a shortcut in Ubuntu which would open new tab and search for selected text in Firefox. For example, if I get some error I would select it press the shortcut and the new search would ...
2 votes
1 answer
2k views

Change the color of directories in GNOME Terminal

When I type ls in gnome terminal directories show up highlighted in green and the text is blue, making it very hard to read the directories. I've tried Edit → Preferences and playing around with the ...
1 vote
1 answer
387 views

CTRL + C for copy paste if something is marked AND interrupting commands

Title is already the question. I bound Ctrl+C to copy, sadly this deactivates interrupting commands. I'm trying to let the shell also interrupt with Ctrl+C (JetBrains IDEs Terminals do this and others ...
0 votes
1 answer
433 views

script file command not found

I have a simple script file first.sh as shown below: #!/bin/bash echo "hello"; a = "test"; echo "$a" when I execute it, it occurs an error as written below: ./first.sh: ...
2 votes
1 answer
4k views

Malformed security header

After installing Ubuntu I shut down my laptop. When I restarted it I got this error message: Malformed security header Failed to read header: Invalid Parameter Failed to load images: Invalid Parameter ...
5 votes
4 answers
3k views

SSH shell launched using "expect" doesn't have full width. How can I make fix it?

I am using expect to auto login on SSH from an Unity launcher, the command looks something like this: gnome-terminal -t SSH1 -e "expect -c 'spawn ssh [email protected] ; expect assword ; send \\"...
0 votes
0 answers
474 views

Exit from all nested shell script

How to exit from all nested shell script calls once in a single command?
1 vote
0 answers
152 views

How do I code switches with the dash in bash shell scripts?

So I'm writing a bash shell script for launching dockers to control whether they are interactive or persistent after instantiating, and give them a name. In the command line I will include the ...
1 vote
1 answer
857 views

Wait for previous command to finish while using tee

I'm using tee as follows: some commands | tee -a >(command1 >> file) >(command2 >> file) >(command3 >> file) How can I delay the execution of command2 till command1 ends, ...
1 vote
0 answers
239 views

How do I edit the xfce4.12 Whisker Menu globally for all users on Ubuntu Studio 18.04.4 LTS via a root file manager or terminal?

I want to edit the Xfce4.12 Whisker Menu running on Ubuntu Studio 18.04.4 LTS in "/". I want to edit the categories like: "All", "Audio Production", etc using either the ...
0 votes
1 answer
330 views

Startup script is not running

I am using Ubuntu 20.04LTS and I'm trying to run a script at startup. I created it in /etc/init.d/, gave it chmod 755 and ran the update-rc.d defaults command but the program is not executed on my ...
25 votes
2 answers
130k views

How can I import a database using command line?

I am using Ubuntu 14.04. I want to import my database which is located on the server /var/www/backup.zip. Also I've SSH access using Putty. Noted that MySQL and phpMyadmin are installed on the server. ...
5 votes
1 answer
373 views

Learning terminal by observing commands being run by GUI [duplicate]

Hello I'm new to the Linux system and would like to know if there is a code or application which opens a terminal that will tell me the lines of code being used. For example, If I were to open a ...
1 vote
2 answers
8k views

creating directory in ftp server using ncftp command from ubuntu terminal

How to create a directory in a specific path in Ftp server by using Ncftp command from Ubuntu terminal. Is it possible?
1 vote
2 answers
2k views

can't pass sudo password [duplicate]

I can't do anything. Whenever I use "sudo", I receive "sorry, try again". I need to install gcc. Can anyone help me? To run a command as administrator (user "root") use ...
3 votes
3 answers
6k views

how do you grep, awk, head and sed an ip address

I'm trying to learn as much as possible about Linux, I'm currently stuck at trying to grab specific parts of my ifconfig text display so it looks exactly like this: eth0: inet 192.168.1.000 ...
0 votes
0 answers
274 views

Unzip Voxceleb dataset through terminal and python

I am trying to use voxceleb dataset for some audio classification. I use this command to download the dataset: wget --user=.... --password=... https://www.robots.ox.ac.uk/~vgg/data/voxceleb/vox1a/...
0 votes
2 answers
23k views

Change or Assign a Drive Letter to an external hard drive (or any drive)

I have an external hard drive that I formatted with Ubuntu (using the Gnome Disk Utility aka Disks) as an NTFS file system. Most of my computers in the house run Linux but I have a housemate using ...
2 votes
3 answers
1k views

Why does ./a.out work, but a.out doesn't? [duplicate]

In my opinion, even a simple a.out on the terminal holds complete information about the file being in the current directory. Reiterating it with ./a.out seems superfluous. Why do we need to specify ...
4 votes
1 answer
1k views

When sudo su vs sudo -i [duplicate]

I am reading some tutorials about Linux configurations: To accomplish many of the configurations is important and mandatory be the root. Well I did realize that in many places are used sudo su and ...
0 votes
1 answer
51 views

Terminal type programs

I am looking for a terminal type program so I can connect via Console / Telnet / SSH into Cisco devices. Does "Terminal" offer this ability or do I need something else (such as PuTTY)?
1 vote
1 answer
5k views

DISPLAY command on the command line

What does the command export DISPLAY=:0on terminal do ?? Is it possible to change the number from 0 to some other value..
0 votes
1 answer
864 views

My command only works when I run it from terminal. It does not work when I use a launcher. What should I do to fix that?

I use the following command to control my phone remotely with scrcpy: adb kill-server ; adb connect (my phone's IP address):5555 ; scrcpy --prefer-text --serial (my phone's IP address) It runs ...
2 votes
1 answer
1k views

command-not-found does not complain about unknown commands in zsh

I installed the command-not-found package and am loading it in my .zshrc like so: source /etc/zsh_command_not_found While I now get suggestions for commands that are not found but can be obtained by ...
0 votes
0 answers
50 views

Command to execute where subfolders contain '.csv'

This is my folder structure: ORDERNO'S YEAR'S MONTH'S DATE'S CSVFILES 408------->2010---->01-->21--->1.CSV --->2.CSV --->22--->...
5 votes
1 answer
5k views

execute script when closing terminal

I want to execute a specific sh script when closing a terminal. I edited the .bash-logout file, added this line of code inside if statement [ -x /home/user/Documents/logout_msg.sh ] && /home/...

1
129 130
131
132 133
457