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

learn more… | top users | synonyms (6)

0
votes
1answer
24 views

MySQL requires restart in Terminal every time laptop is restarted. 14.04.2 LTS

I installed MySQL a few weeks ago. The problem now is that every time my laptop is restarted I also have to manually restart MySQL in terminal via: sudo service mysql restart The errors I get ...
1
vote
0answers
18 views

My root user account is not in the sudoers file [duplicate]

How do i add my root user name to sudeors file in my Ubuntu operating system, because i can not have access as a root user now.
0
votes
1answer
44 views

Installing application error in terminal

I was going through the Ubuntu FAQ and I came across an antivirus called clamav, it was a problem getting the obvious ./configure command and after the flashing processes in terminal the last line of ...
2
votes
1answer
55 views

how to take the total working hours of the system in a day?

I need to take the total working hours of the system in a day. That means, take time between power on and shutdown and also subtract the time of system were suspend. Final output must be total working ...
2
votes
1answer
32 views

What do numbers between parentheses in bash man pages mean: bash(1), ssh_config(5), sshd(8),

Most of bash commands have an help manual which can be opened in the command line by using the command man: man bash man ssh_config man sshd On the first line of every man page for a command, we ...
1
vote
3answers
45 views

echo to file works only with sudo su

I am using the Jetson TK1 development board from NVIDIA which has Ubuntu 14.04 on it. It is a 4-core ARM system and by default, 3 of them are "offline" - ubuntu@tegra-ubuntu ~ $ lscpu Architecture: ...
1
vote
2answers
367 views

Open xxx.out file with doubleclick?

This is my first post so please don't mind my mistakes. I have searched on google for some time but can't seem to find the answer to my question. After I wrote some code in c language with gedit, I ...
0
votes
2answers
29 views

Run sudo commands from standard account

I've recently had an increased interest in how multiple users are handled in Ubuntu, and have hit an interesting problem: running commands as sudo from a standard account. If I run a GUI application ...
2
votes
4answers
312 views

Download all media files from webpage

How to download all media files(pictures + Videos) from a webpage?! Any app is acceptable but wget is preferable
7
votes
5answers
541 views

how can I take total minutes from time?

My system displayed the time like this 10:42 when i input the command date +%R. I need to take in total minutes of the time. That means like this 642 minutes. Is there any command or shell script for ...
0
votes
1answer
24 views

BASH: boolean statement unexpected behavior when checking for whether a directory exists

I have to get some files from a device and store them in a directory with a particular name. I'm writing a script that does this, but one of the first things it does is it checks if the directory with ...
14
votes
4answers
2k views

What is `$?` ? Is it a variable?

The question is pretty straight forward. I can get the exit code of the previous command by using $?. But what exactly is it? I don't think it is a variable, because you can't have any special ...
6
votes
2answers
85 views

Adding a suffix at the end of each shell command

Is it possible to automatically add some characters at the end of each command typed in the terminal. For example, if I write sudo apt-get update the shell will execute sudo apt-get update ...
1
vote
1answer
29 views

How to create shortcuts in terminal? [duplicate]

I'm using Ubuntu 14.04. I often use cd .. command in terminal. I want to replace the command with .. or some other shortcut. Can I do that? If yes, how to do it?
3
votes
1answer
24 views

No new line in terminal ubuntu after changing prompt style

I changed the PS1 for terminal to export PS1="\033[0;33m\h:\W \u\$ \e[m" Now, it doesn't type into new lines in case of a long sentence. Instead, it just overwrites on the existing written stuff ...
0
votes
0answers
32 views

Ubuntu 3.13.0-48-generic PATH Variable Not Working

I am trying to edit the PATH variable on a fresh Ubuntu install. For some reason it keeps throwing the error "No such file or directory" whenever I try to invoke my command. java;echo PATH=$PATH;echo ...
2
votes
1answer
30 views

How to multiply negative numbers in bash

This is my script for multiplying negative numbers #!/bin/bash p="1" h="-10" z=$(echo "(($p)*($h)+2"| bc -l) echo $p $h $z and this is the result (standard_in) 2: syntax error 1 -10 how to ...
0
votes
1answer
31 views

Is it possible to see a log of all terminal output that occurred after running a command?

I know it's possible to see a history of all commands I've run, but is it possible to see a log of all terminal output that occurred after running a command? Context is that I want to see exactly ...
2
votes
2answers
32 views

Renaming (.filename) file to original names

I'm trying to revert a change I made via rename. I was renaming files in a subfolder, then without thinking, tried to clear the .. from names using: rename "s/.././" * Now I have a folder of 600 ...
0
votes
1answer
29 views

How to subtract float values in shell script

I have a script which uses float values but some how i am not able to subtract two floats. This is the sample code #!/bin/bash p="1" h="10" m=$(echo "3.5"| bc -l) for (( c=$p; c<=$h; c++ )) do ...
0
votes
2answers
42 views

How to install the any downloaded software packages via teminal [duplicate]

As a new Ubuntu user I installed the OS by downloading the software via terminal commands without problems. Now I would like to install additional software packages. While trying to install downloaded ...
2
votes
1answer
39 views

Find and replace special characters in a directory

I have a number of Windows based .m3u playlists - they start with ..\..\ and have \ instead of / for folder paths, whereas Ubuntu prefers they start with /media/usr/part/dir/ (i.e. the absolute path). ...
14
votes
2answers
487 views

What's the missing argument to -exec?

I use the following command to clear a directory, of files and directories over 30 days old, and move them to an archive directory which I can delete after a few weeks if nobody asks for their files ...
4
votes
4answers
1k views

What is the difference between scp and cp?

I'm really new to the command line and Ubuntu and I have recently learned that there is the scp command as well as the cp command. I tried to use an scp command to move a directory from Point A to ...
0
votes
1answer
74 views

cc1plus: error: unrecognized command line option ‘-std=c++11’ [closed]

I am installing pothosware but the following error occurs: cc1plus: error: unrecognized command line option ‘-std=c++11’ I am trying to install through synaptic package manager .
1
vote
1answer
30 views

Sending MIDI clock only (bpm count) through USB to sequencer [terminal]

I'm trying to send bpm to my Arturia MicroBrute sequencer through USB. It has USB MIDI input through that port as it can be seen on many YouTube links and I easily manage to sync it with Reaper DAW on ...
1
vote
1answer
52 views

How to sort numbers in text files? [closed]

I made a file using ed and named it numeric. Its content is as follow: -100 -10 0 99 11 -56 12 Then I executed this command on terminal: sort numeric And the result was: 0 -10 -100 11 12 -56 99 ...
1
vote
6answers
71 views

How to fetch numbers from a file and calculate using shell script [closed]

I have a file named numbers.txt. That contain some numbers like this 1568 14578 2365 41655 9965 ... ... I need to take sum of these numbers. How can i take this using a shell script??
2
votes
3answers
172 views

How to install certificates for command line

So in school we need to install a certificate to access https sites. In firefox, I can import the certificate. However, I can't do so with the command line. For example, running git push I get: ...
0
votes
1answer
50 views

Change desktop environment from terminal?

I have installed Crouton on my chromebook, with the standard unity desktop(Ubuntu 12.02). However, I wish to use the Gnome 3 desktop environment. I cannot however install gnome-shell, since it ...
1
vote
1answer
33 views

Writing an alias that puts a folder and its subfolders/files into an encrypted archive titled with the date

I am trying to write an alias that puts a folder and its subfolders/files into an encrypted archive titled with the date the command is run. Preferably in format "YYYYMMDD FolderName Backup". E.g. ...
0
votes
1answer
25 views

terminal not working it wont let me put in my password [duplicate]

after I type in a command in to the terminal it ask for my password but when i try to type in my password nothing happens don't know where to go from here
0
votes
0answers
22 views

Lubuntu: Make Control+Alt+T open a new terminal on top of all windows?

I'm using Lubuntu. Whenever I open a terminal using Ctrl+Alt+T, it opens lxterminal behind whichever window is currently focused. Is there any way for this shortcut to open lxterminal on top of all ...
0
votes
1answer
28 views

how do i send a command to execute on a terminal?

I am executing system ("./get_emotion.sh"); which opens a terminal and establishes some connections. Then it requires this input set all evi . I have tried using && in system() to send input ...
0
votes
0answers
28 views

Executing Pure Data Patch from within Python/Shell on Raspberry Pi

I am searching for a way to execute a Pure Data patch from within a Python/Shell script. I have the PD patch (called sf.pd) on my Pi in a folder called /home/pi/pd. To execute the PD patch from the ...
0
votes
0answers
26 views

Installing brackets

I'm trying to install brackets.i've used the dpkg command.i've checked /opt and there's a new folder called Brackets.What should i do with it in order to run brackets? When i type brackets in ...
1
vote
2answers
27 views

could not execute a file generated by php from terminal

I am trying to execute a file from terminal generated by PHP. When i manually type the file, its executing the perfect. But when it is generated by PHP program, it throws an error. The permission of ...
0
votes
0answers
8 views

Why is sage not cooperating with urxvt?

I'm running Ubuntu 14.04 and having a problem getting the computer algebra system sage to cooperate with my terminal rxvt-unicode-256color. For instance, issuing the clear command returns an error ...
1
vote
2answers
44 views

I can not remove blender

I want to install the new version of blender (2.75), but first I have to remove my old version of blender (2.74), I try to remove blender with this command: sudo apt-get remove blender but when I ...
2
votes
1answer
30 views

Bash completion for commands that start with specified letter?

Is it possible when I press Ctrl+r and after this, for example, press the letter a, then using the up and down arrow key to search only the commands in the history that start with a? Or if I type ssh ...
2
votes
2answers
56 views

7zip: How to exclude file types?

I want to exclude the following file types: epub pdf html (upper case too) azw3 mobi opf txt I have this so far which doesn't seem to work, i get an error saying "Incorrect Command Line". 7z e ...
0
votes
1answer
22 views

High values of cpu load

The system uptime command is returning values above 5... This is a high value right? What could be the reason behind this?
1
vote
1answer
117 views

Ubuntu phone Apt-get install not working

I have purchase the Meizu mx4 Ubuntu edition and I downloaded the Terminal application from the store. I wanted to try to install anything through the terminal but it's always the same answer: W: ...
1
vote
1answer
19 views

what-source (part of what-utils) returns package name two times

On my Ubuntu 14.04.2, what-source returns two times the package name for some packages, e.g. ~$ what-source openssl openssl openssl or ~$ what-source firefox firefox firefox Is this normal ...
0
votes
1answer
35 views

Terminal session message: unable to find PtrFeedbackClass — Ubuntu Mate 15.04

Running a fairly stock install of Ubuntu Mate 15.04 the following message started showing up each time I open a terminal session: Here is some xinput output: unable to find PtrFeedbackClass for ...
0
votes
1answer
53 views

Drop/Undo sudo privileges on .py file which runs inside a program which runs from sudo previleges

I need to run a program from sudo privileges and I am running .py file inside the program. So when my program runs from sudo then it automatically calls/runs the .py file with sudo. I am running file ...
0
votes
1answer
35 views

installation of wine

i was trying to install wine on ubuntu 14.04. I used the command sudo apt-get install wine. A complete process was worked out. Around 140 MB data was downloaded from the internet but suddenly it was ...
0
votes
1answer
21 views

Alias syntax for mpirun

I execute my jobs in terminal using: mpirun -np 4 lmp_fedora < in.stdinfile Now I want to create a permanent alias run so that I can just input the command: run < in.stdinfile from any ...
0
votes
2answers
42 views

How to skip a record with awk

I have a large number of files in a log-directory, whose names were time-stamped (in this case with date +%b[...]). I want to write a POSIX compliant one-liner that will: either skip lines output ...
1
vote
2answers
66 views

What do I type in a terminal to understand what commands mean? [closed]

Is there a shortcut key to list what each Help command in the Gnome Terminal means? I got it to list by accident but didn't know the key switch to slow down the list, I am guessing these are DOS?