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

learn more… | top users | synonyms (5)

2
votes
2answers
58 views

Reinstall Ubuntu 14.04 from the terminal window [closed]

Any Code to put in the terminal that will bring back the settings to original ???
1
vote
0answers
24 views

Use package without declaring its version

I have installed g++ from here. When I want to compile a program, I have to use g++-4.9 myle.cpp. How can I set it to use without declaring its version g++ myle.cpp?
0
votes
0answers
26 views

softwares installed from source code not starting

I had an older version of code::blocks and I thought I'd update it so I downloaded code::blocks 13.12 source code and installed it from the terminal with these commands: ./configure make sudo make ...
1
vote
3answers
57 views

Edit text iteratively within a file using commands

I am a new Ubuntu user. Please help me in solving the following problem: My input text file is -0.716425 -12.8939 -3.3341 -7.38497 -2.62709 3.00437 -6.69861 -13.8853 -5.81095 -7.37465 ...
5
votes
3answers
337 views

Amendable console output in Python

Some programs are able to amend console output, wget easily comes to mind. How can I do that in pure Python? I know IPython has clear_output(). I tried that but even that does not work. And I would ...
5
votes
2answers
222 views

How to trace/monitor the I/O of a Linux command

I ran find / -name abc.html and a short time after I ran this command again. This time it was very fast, so I know the find must be caching the result somewhere. How can I find out where the cache is ...
0
votes
1answer
16 views

cannot get to command line on my ASUS 1015E running Trusty

My ASUS 1015E (netbook) has as its OS UBUNTU 14.04.2 LTS (Trusty Tahr). Yesterday, as it ran the weekly updates to the OS and my applications, I lost power, and it died mid-update. Now I have NO ...
1
vote
0answers
25 views

speech-dispatcher always stop working after terminal exit?

In a previous question I made this line: trap 'clear; ~/ascii3.sh; spd-say "Exit"; sleep 2' EXIT The content of ascii3.sh is: echo -e "\033[01;31m" echo " _ _ __ _ _ ____ __ __ _ ...
0
votes
1answer
11 views

How to make speech-dispatcher work with variables?

I tried some bash variables with spd-say command just like the date variable spd-say $date or spd-say "$date" but didn't work with me. So how to make it accept variables?
-1
votes
1answer
22 views

How to stop renaming a file which was already renamed using loop in shell script

I have a directory name dir1 containing another directories named 1,2,3,4,5. Now I want to rename directory 1 with 4, 2 => 5, 3 => 6, 4 => 5. but my problem is using mv command in shell script ...
0
votes
1answer
36 views

get mac address of device

I have a scientific instrument, which I am trying to connect via cross over cable. I need to get that device's mac address so that I can configure the communications server. How can I get the MAC ...
0
votes
1answer
22 views

Zip folder exclude some folders

I'm trying to backup my www-folder but hidden folders like .config inside www are added to the backup. I want to exclude the folder "backups" and all folders (and files) starting with a dot. Current ...
2
votes
1answer
30 views

sed to execute a command as replacement with substitution pattern as argument

I am trying to replace time in a log file by: cat mlog.log | sed -e "s/^[0-9\.]*/\$(date -d @&)/" Why it always first execute $(date -d $&) but not doing replacement at first and then ...
0
votes
0answers
19 views

How to store last email in a file?

I wanto to set my bash detecting incoming e-mails and maybe execute commands in the emails, detecting programmed regular expresions, what commands does let me to do this? I'd like to have a solution ...
2
votes
0answers
35 views

Why doesn't my terminal display this character?

I like to run emacs in terminal, which is rxvt-unicode-256color. In the terminal my /etc/i3status.conf displays this: However, when I run emacs outside of my terminal the same file is displayed ...
0
votes
0answers
18 views

Execute on double click [duplicate]

How can I make a file ".txt", that contains some terminal commands, to execute them by double-clicking the file?
1
vote
3answers
35 views

Force “bad” (not 0) return code of terminal command?

I have a framework written in python, and for testing purposes I basically want to do a subprocess (aka shell call) ... that should simply come back with a RC != 0. I tried to invoke some non-existing ...
2
votes
3answers
134 views

How to run a bash script after 20 sec on Login?

I want to run a bash script like: #!/bin/bash echo 'cpu limit bomi player at 40%' cpulimit -v -e bomi -l 40 Just 20 seconds after Login into my user. Can you please help me to do that? ...
2
votes
2answers
29 views

Timing limiter for execution of commands in Bash/Shell Script

I have a shell script which looks like this: echo firstOutput read -s command0 command1a command1b command1c echo secondOutput command2 command1a, command1b, command1c are individual commands but ...
2
votes
2answers
38 views

When to use a preceding slash in path names? (e.g. for the 'cd' command)

I am a novice user and I am trying to install Oracle Java. The process calls for me to access /usr/local/java, but here is the problem. I get as far as /usr/local, then this is the message I get: ...
0
votes
2answers
43 views

What does '~$' mean? [closed]

I just reset my username and password and am logging in for the first time since reset. After entering username and password, I get a prompt username@ubuntu:~$ What do I type in for that?
13
votes
1answer
616 views

opposite of eject command?

I have a ton of CDs to image, and I just got curious. I can eject with the eject command. What command inserts the disk tray back into the CD drive? yes it is the type that can pull the tray back in. ...
4
votes
3answers
264 views

improve bash script

I have a quad core desktop, and i wanted to know the average temprature according to sensors. so i wrote this bash 1 liner. echo `sensors -A | awk {'print $3'} | sed 's/+\|(crit\|0:\|°C//g'` | awk ...
2
votes
3answers
130 views

ps -xa | grep node to kill specific process

I am currently using the following command to get a process: ps -xa | grep node Which results in the following: 13611 ? Sl 0:03 /opt/brackets/Brackets-node /opt/brackets/node-core 20713 ...
1
vote
1answer
28 views

Internal Differences Between File deleted from GUI and CLI

I am using inotify system call for watching one of my file for all the events (delete,modify etc). But When I deleted file from GUI, no notification was fired. Whereas when I deleted file from CLI ...
-2
votes
0answers
20 views

Conditional statements go wrong when set Shortcut

( C=1 if [ $C == 1 ] then echo "True" else echo "False" fi ) > ./log.txt When i run it in terminal, it output True (expected), but when I set a shortcut keyboard to run ...
7
votes
3answers
319 views

How do I search shell command history with a text editor?

I know that Ctrl+R let's you search command history, but it's a little primitive. Is there a way to export all my command history (not just the current terminal session, but the full history) to a ...
0
votes
2answers
41 views

Using “users” command gets my name 2 times?

I was looking for some shell commands, and I took a look in "users" command. I was hoping to get only 1 name, but I got 2: nori@nori-hidamari:~$ users nori nori And when I run the command "who" ...
0
votes
0answers
44 views

How to stop Terminal from closing when I press Enter?

My Ubuntu terminal closes after pressing Enter couple of time. Sometimes, it closes after I type: ll <enter> Any idea how to solve this problem?
-2
votes
0answers
29 views

Why can't I add a specific directory to $PATH?

I have tried editing all the files suggested in various internet posts and none of them seem to work. I have a java executable in /home/aaron/.java8/bin but whatever I do, I can't execute it by ...
3
votes
1answer
43 views

Is there a bash/terminal command that will clear content prior to the last command?

Use case: I'm working in bash/terminal and have been typing several commands and I've just run something and it's spewed some output. I'm trying to find where that output started and have to visually ...
0
votes
1answer
26 views

how to stop using export command

every time I run gdb I have to type export SHELL=/bin/bash or gdb would return exit with code 127 my question how to make this command run every time automatically without need to re type it because ...
0
votes
2answers
41 views

Ubuntu Password Change [duplicate]

I am trying to change my password. I was able to change the password using the root shell, then I rebooted my computer. I tried to login using the new password and it seemed to work, but after putting ...
1
vote
0answers
17 views

rmod iwlagn error message (it is not loaded)? [duplicate]

I'm trying to fix my slow wifi connection and when I typed the command I got an error message. rmmod iwlagn: rmmod: ERROR: Module iwlagn is not currently loaded
3
votes
1answer
46 views

Create zip files in /var/www/html using crontabs

As the title explains, I'd need to take a file and put it into a zip archive once a day; also, the zip file has to be moved in /var/www/html, where a .php scripts allow users to download it. Assuming ...
0
votes
2answers
59 views

How to get the pid of a process in Python [closed]

I wrote this script to stop processes: parser = argparse.ArgumentParser(description='this script allows you to connect a device in your network') parser.add_argument('-m', '--mac', dest='mac', ...
1
vote
1answer
30 views

How to get a list of the package home pages in a repository section from command line?

A while ago, I asked here about how to get the list of packages in a repository section from the command line. According to the Synaptic Package Manager, many of these packages feature a home page. ...
1
vote
0answers
40 views

Bash script: command not found

I have an executable script install_packages.sh in /home/etienne/admin folder. The directory's path is added to $PATH variable from /etc/bash.bashrc. When I type #echo $PATH I see that the variable ...
0
votes
1answer
38 views

Problem with terminal transparency

I have a problem with the terminal on my Ubuntu netbook. Whenever I open the terminal it is completely transparent without a menubar or anything, and I can't see the text at all. Right clicking on it ...
9
votes
3answers
626 views

How to list files older than a day with “2015” in filename?

I want to list all the log files which do not belong to today and only the files that contain 2015 in their names. These are the commands I have tried: find . -name 2015 -mtime +1 -exec ls -ltrh ...
0
votes
2answers
25 views

Steam games in usr/bin

I use /./usr/bin/applicationname to launch programs using terminal, but steam games (or steam) doesn't show up in it, although I can put a steam game in my favorite applications list. Is there any way ...
2
votes
2answers
37 views

How to scan more than one location at the same time with ClamAV

When scanning my computer with ClamAV what I normally do is execute something like: sudo clamscan -r --detect-pua --infected --bell / | tee ClamscanLog16.txt But sometimes I am scanning more than ...
0
votes
2answers
26 views

How to set the initial number of columns in gnome-terminal when opening multiple tabs?

I am trying to output log text to gnome-terminal tabs from the command line. This can be useful for saving session data and later restoring it. Here is an example: #! /bin/bash long_text=$(awk ...
1
vote
1answer
31 views

How can I install IDL 8.4 from .pkg installation file on Ubuntu?

I would like to install the IDL 8.4 on my Ubuntu 14.04... The installation requires starting the Install_IDLENVI.pkg installation app. Everything I have tried so far following various advices on ...
2
votes
2answers
48 views

How to set active tab in gnome-terminal?

When I open gnome-terminal with multiple tabs from the command line, I would like to preselect (on the command line) which one of the tabs should get focus. I tried gnome-terminal --tab -t A ...
0
votes
0answers
24 views

Why is the queue option not available for the kill command?

The -q or --queue option for kill command is not available on Ubuntu. The kill command implemented on kernel.org supports this option, but the one implemented by procps does not implement it. What are ...
-1
votes
1answer
20 views

Guake won't open, ImportError: No module named _gobject

I'm sorry if this isn't the right place to ask this question. I'm running Linux Mint and my computer dual boots with Windows 8.1. I usually use guake terminal. However, it won't open any more. As I ...
-2
votes
0answers
31 views

How to Recover deleted Files in Terminal [duplicate]

I need some help. I accidentally deleted my directory using this command: sudo rm -rf How can i recover it?
0
votes
2answers
39 views

when ssh is run with a server + command argument, what startup profile runs if any?

I know /etc/profile and ~/.profile are among the start-up scripts used when ssh is used to login to a server – i. e. using ssh with server argument. However, the scenario where I am just using ssh ...
1
vote
1answer
25 views

Problems installing rEFInd through windows after Ubuntu install

I installed Ubuntu alongside Windows and I can't figure out how to boot into Ubuntu. So now I'm trying to install rEFInd. Fallowing the instructions here I ran into a problem running the xcopy /E ...