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

learn more… | top users | synonyms (6)

3
votes
1answer
271 views

Configure Linux Text mode Size (Rows and Columns)

I'm having issues with controlling the size of a text-mode program. This is a database program (Dataflex) that I recently had working on Windows 98 DOS mode and now am moving it to Linux. I have ...
0
votes
2answers
603 views

Enforce a shell script to execute a specific python version

Update. Changing the alias unfortunately does not work. I have changed the alias to alias python='/usr/bin/python2.7' however the shell script still runs the python script in 2.4.3. Muru - I am ...
2
votes
1answer
2k views

Xresources not working properly after restart

I am trying to change my xterm theme using a hack in Xresources which i found in this website. i have created a Xresources in my home dirctory and entered the below code. XTerm*faceName: Bitstream ...
0
votes
1answer
479 views

Grep/egrep not working correctly?

I seem to be using grep incorrectly. Observe: > hg log <filepath> | egrep changeset changeset: 3961:9dedc55e030a changeset: 3651:d23495ab1168 changeset: 2974:6aa71cb2c575 changeset: ...
3
votes
1answer
149 views

How to run a single command multiple times while changing one word in the command each time it is run?

I've got a command like this: grep word1 file.txt | grep word2 | grep word3 I want to be able to run this entire command multiple times while changing the value of "word1" each time. I have a file ...
1
vote
0answers
109 views

Terminal GDM session

How would I create a session file so that when I login using GDM it just launches a terminal session (No windowing, just a plain terminal like in Ubuntu Server)?
1
vote
2answers
179 views

Folder permissions changed [duplicate]

I have very specific questions regarding permissions. I have delved into the FilePermissions Wiki - https://help.ubuntu.com/community/FilePermissions Recently I installed an ecommerce open source ...
1
vote
1answer
2k views

Why does this apt-get command work in one context but not the other?

I'm trying to add the plpython package to my docker container (running an Ubunutu image) using the following command (RUN being the docker command that you can ignore if you don't know Docker): RUN ...
2
votes
3answers
290 views

Error when running script in bash

I wrote a script in bash to basically create aliases, but for any reason, it doesn't work in some cases. Here it's the code: #!/bin/bash #Script to create unique and permanent aliases _add_alias() { ...
0
votes
1answer
224 views

why google chrome shuts down after closing the terminal?

I have to use Google chrome while running the terminal in the background. In fact if I press ctrl+c it shuts down with the Google chrome too. Why is it happening? Is there any way I can resume Google ...
0
votes
3answers
3k views

How to copy folder as root in Lubuntu 14.04 terminal?

I am trying to copy the b43 folder into the /lib/firmware folder. I know I asked this before, but this is on a completely different OS. I can't seem to launch nautilus using sudo nautilus or gksu ...
1
vote
2answers
346 views

Why won't XScreensaver install from the command line?

All I know is that I get the following output in my terminal: supuhstar@SupuhComp-U:~$ sudo apt-get install xscreensaver xscreensaver-gl-extra xscreensaver-data-extra xscreensaver-screensaver-bsod -y ...
0
votes
1answer
1k views

How to make a “clean wineprefix” in a terminal?

I'm trying to install wmp10 through Wine so I can use the digital library accessing programme Overdrive. (Installing wmp10 through PlayOnLinux doesn't enable the DRM that allows Overdrive to work, ...
3
votes
3answers
5k views

Get current ssh session's originating IP without being superuser

I am trying to find out the current ssh session's originating IP address. I found the following to be useful, but it requires sudo: $ sudo netstat -tapen | grep ssh | awk '{ print $5}' | sed '/0.0.0....
1
vote
5answers
381 views

How to check which processes are still active after a user session has logged out

I am needing to do some debugging work, and as a part of that debugging work I need to know if there are any processes still running after a user session has logged out. And I need to specifically be ...
4
votes
2answers
1k views

Closing all instances of Terminal at once, cleanly

I am trying to find out how to close all windows of Terminal (quit all instances of gnome-terminal) at once, cleanly. By "cleanly", I mean that it doesn't just simply kill all the instances at once, ...
1
vote
1answer
146 views

How to remove all lines in a file containing a string from another file

I want to remove all lines in a file containing a string from another file. So I don't want to remove the lines which are identical, there are none, but remove all lines if they share a string from ...
2
votes
2answers
12k 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
38 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?
1
vote
3answers
97 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 -0....
5
votes
3answers
819 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
732 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
25 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
60 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
36 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
105 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
144 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
145 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
2answers
186 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 ...
2
votes
0answers
230 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
25 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
746 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
821 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
554 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
195 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
104 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
957 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
359 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 '{...
3
votes
3answers
6k 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 ...
2
votes
2answers
85 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 ...
7
votes
3answers
559 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
64 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" ...
3
votes
1answer
145 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
125 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
108 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
460 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
2k 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
2answers
94 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
451 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 ...