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

learn more… | top users | synonyms (6)

1
vote
1answer
85 views

How to make in-focus terminal windows more obvious?

I use the default gnome-terminal. My workflow is to have two terminal windows opening side by side. The problem is I'm often typing in the wrong side which is not in focus. Is there a way to make in-...
0
votes
0answers
57 views

What is sudo apt-get install libc6…? [duplicate]

I'm having a problem here. I need to install DDD in Ubuntu 14.04 64-bit, but something is not working. I downloaded it and installed it, but when I want to run a program in Terminal, it shows me a ...
0
votes
1answer
60 views

Bash script in terminal on boot

Is there any way to run a .sh script in a terminal window on boot? My computer boots slowly and I want to be able to press the button and leave to save a lot of time. This script is a looping ...
0
votes
3answers
73 views

Substitute specific char sequence inside filenames

A friend of mine grouped tons of files in this way on windows After I made him switch to Ubuntu, files are no more ordered based on the number of exclamation marks in front, so I would like to know ...
1
vote
2answers
495 views

How to send a mail/write to other user through a shell script? How to send EOF?

if [ who | grep $user | grep pts ] then write $user message here EOF fi Here if I execute it, it is blocking at write and I have to enter a ...
3
votes
4answers
93 views

How can I divide output with delimiter?

I would like to change: e·ver·y·bo·dy to: e·ver·y·bo·dy e·ver·y·bo· e·ver·y· e·ver· e· A for loop will be greatly preferred.
1
vote
1answer
111 views

Gnome Tab not recognizing Rails anymore using ubuntu 14.04

I am having a strange issue , my main terminal is recognizing the RVM , Ruby and runs Rails command as well , and I had two tabs opened yesterday which were recognizing all of the commands . Today ...
1
vote
2answers
170 views

permanent terminal with root [closed]

Is it bad to have at all times (one) terminal logged in as root? If so, why? (I leave the window with root terminal usually opened because it's much more comfortable than writing sudo before ...
1
vote
0answers
82 views

USB Modem Network Mode/Type

I'm using a Huawei E173 USB modem. With comgt sig I can easily get the network's signal strength, but I didn't find a way to specify which type of network is used (either GSM, Edge, or UMTS). Is there ...
5
votes
7answers
673 views

split a file based on pre-defined set of rows

I want to split a text file according to a pre-defined set of rows. For example. I have a file a b c d e f And then I have the following sets of rows (these could be stored however it is more ...
8
votes
6answers
2k views

How do I count text lines?

How do I count how many lines are in text file. e.g : command file.txt Note, I want to only count the non-empty lines (lines without counting white space and tabs)?.
3
votes
1answer
1k views

Open URL in default browser (Chromium) from terminal and give browser focus

I am trying to open an URL from the terminal window in my default browser which is Chromium: $ xdg-open 'https://www.google.no/?gws_rd=ssl#q=site:askubuntu.com+xdg-open' >/dev/null This will ...
1
vote
2answers
339 views

Is there any way to execute a shell script whenever I open a terminal?

I want to display a message showing "welcome to terminal" whenever I open a terminal. Any ideas?
0
votes
3answers
174 views

How to Keep Text Consistent in A Shell Script

Good Day! I am creating a Shell Script so I can then use it to do X (Won't tell) This is my Current Script clear echo Ahmad A Kazi echo IDNO: BD_3456 echo echo Data Clear Program echo c 2015 Ahmad ...
1
vote
1answer
310 views

Error When Installing Anything

Every time i try to install wine in the terminal i get these errors Reading package lists... Done Building dependency tree Reading state information... Done wine is already the newest version. ...
2
votes
1answer
505 views

How to create a common base folder with tar and how to rename folders?

So I'm pretty new to Ubuntu and the whole Linux environment though I'm a computer scientist and I want to become familiar with the basic commands. At the moment I am working with .tar and .tar.gz ...
2
votes
1answer
68 views

How can I print a variable to a file?

How can I print the contents of a variable into a text file? For example, I have the following script: #!/bin/bash #My Bash echo "saisir votre nom" read $name I would like to print the contents of ...
2
votes
1answer
391 views

bash: /home/…/program: cannot execute binary file

I've got a problem with simple program. When I try to run it double clicking it. Also when I try to run it by writing its path in the termilal and it says bash: /home/barosz/Downloads/networktablet-...
1
vote
0answers
109 views

Trying to connect wifi in Ubuntu 12.04 via terminal

I use ubuntu 12.04 and I'm trying to connect wifi via terminal. I did the following from root: $ iwlist wlan0 s - And I found my wireless network there $ wpa_passphrase essid_name pswd > /etc/...
1
vote
1answer
206 views

How to move all subdirectories to current directory?

I'm new to shell script programming. Suppose we have a file hierarchy like this: /A/B/C/D /A/B/E/F/G /A/H/I /A/H/J/K Note that here we not only have /A/B/.., but also /A/H/.... All letters are ...
0
votes
1answer
39 views

How can I install Ubuntu with no boot options?

Here is my walk if shame: I ran the command sudo rm -rf ~ /.local And it deleted everything on my system. It is (or was) a Vizio CT14. The reason I ran this command in Terminal, if this is ...
13
votes
2answers
800 views

Wrong behavior of sort command?

I tried to sort the content of a file in Ubuntu desktop 14.04 (Trusty Tahr). In my case, the expected result should be same as original content, but the actual result is not. Why? # cat test.txt a++-...
0
votes
1answer
143 views

I can't run a program in Ubuntu 14.04

I've got a problem with a program I downloaded last week from GitHub. I tried to chmod it (a+x), tick option to run it as a program, but it didn't help. I don't get any notifications. It just does ...
1
vote
1answer
1k views

Image format conversion from terminal?

Is there any way to convert image formats from Ubuntu terminal? Particularly from eps to png/jpg or to any other formats.
0
votes
1answer
66 views

Lost name of tabs in gnome-terminal

After trying to installing one of the themes I lost names of tabs I reset settings in terminal, dconf, reinstall gnome-terminal but no luck. Theme was reset but tabs not come back. Also when I'm ...
5
votes
2answers
3k views

copy to clipboard current path from console with no mouse [duplicate]

I'm wondering if it possible to copy to clipboard output of pwd command. I often need to copy some path and I have to select it with mouse, do several clicks and that is annoying for me. What I want ...
2
votes
1answer
4k views

What does “.bashrc or prepend the Anaconda install location” mean?

I installed Anaconda from root, after completion of installation this message was displayed on terminal screen: Python 2.7.8 :: Continuum Analytics, Inc. creating default environment... installation ...
6
votes
1answer
501 views

Shell scripting bash: How to detect Alt+N keystroke?

I want to write a script that always listens in the background and execute a particular command when the user hits a specific key combination such as Alt + N. How this can be done?
0
votes
1answer
116 views

How to I parse a file and only keep certain words?

Let's say I have a list of words I want to keep. list=['hi','name','first'] I want to be able to go through a text file, keep each and every word in my list, and output the new cleaned up content ...
0
votes
1answer
91 views

Pipelining and xargs

I am trying to delete some .class file from a directory. So first I have tired to count the available .class file using the following command (after going to the directory) - $ find . -name *.class |...
0
votes
1answer
76 views

uninstall software in command line [duplicate]

I install a software in commande line from this source and I did : tar -zxvf geneid_v1.4.4.Jan_13_2011.tar.gz and make but I put it in my Download folder, so I would like to install it in a more ...
2
votes
2answers
391 views

How can I output a single word in the terminal

The title doesn't give the question justice. I'm writing a shell script, for use in conky, to get the status of my mouse and keyboard's battery. Previously, I used upower to do this: dev=`upower -e | ...
1
vote
1answer
61 views

Can't see what I type after run “debugfs”

I use Ubuntu 14.04 and yesterday I tried to find out create time of a folder using debugfs. debugfs -R 'stat <inod>' device after I get the result of that in terminal, if I use Q for exit it'...
4
votes
1answer
188 views

How to detect keystrokes?

I have a script running always at the background. Inside that script I have to write the codes to detect keystrokes, and once a particular keystroke is detected, the rest of the script must be ...
1
vote
1answer
288 views

Data transfer between two remote servers linux (sftp)

I work remotely trough my Linux system. I have data on server A which can be accessed only through SFTP. The second server is an HPC cluster. I want to fetch data in my HPC cluster working directory ...
1
vote
1answer
233 views

concatenate the argument of date into one string

my main program takes a time stamp having the format of the date as well as the time, separated by a comma, but it is still one string and one argument: #source main.sh '2015-02-10 00:00:00' Now, I ...
7
votes
3answers
4k views

How to set custom keyboard shortcuts from terminal?

How to set custom keyboard shortcuts from terminal for different Linux versions? Basically I want to know where Linux stores the keyboard shortcut files and how it can be edited. On my research I ...
2
votes
2answers
2k views

Help running FightCade application?

I'm new to Ubuntu and trying to get the application FightCade (fightcade.com) up and running. I followed the directions in the readme file, but have run up against a wall: I used the terminal to ...
1
vote
1answer
246 views

Sending commands to detached screen doesn't work

I'm attempting to create a detached screen and then send it a command, but this doesn't seem to be working. If I enter the following commands: $ screen -ls No Sockets found in /var/run/screen/S-ec2-...
0
votes
1answer
58 views

need help installing AptUrl or changing the enviromental variable

I understand how to get the file to install, I have to type out "sudo apt-get install apturl" and it should open the package for installation. I type out the command and I got this "mspyellow@BJ:~$ ...
0
votes
1answer
88 views

Problem in unmounting a disk image with a script… but not manually!

It is my first experience in writing shell scripts and something curious is happening. I'm working on an embedded system and I wanted my script test5.sh placed in the /root folder of the guest system ...
0
votes
4answers
779 views

bash script which checks input to see if it is “y”, “n” or other - not working

I have written this bash script which is meant to check your input to see if it is y, n or something else (this will be part of a larger project): #!/bin/bash echo "Have you updated the PATH ...
2
votes
2answers
408 views

How to assign File/Folder path to a Variable in Terminal

Say I have the following path: /home/$USER/Downloads/My Folder I tried to assign the above given File-Path to a variable FILE_NAME as follows, FILE_NAME=/home/$USER/Downloads/My Folder $FILE_NAME ...
2
votes
3answers
3k views

How can I add a backslash before all spaces of a file?

How can I replace a character with a space, preferably by using tr or sed commands? So I want this to happen in my script: #!/bin/bash line="hello bye" echo $line | tr ' ' "\\\ " This is supposed ...
1
vote
0answers
12 views

man, info pages for a specific flag [duplicate]

The man and info pages can be rather long. I only want information about a specific flag for a command. Example: man ls -a should return information about the a flag for the ls command, maybe ...
0
votes
1answer
377 views

Unlock files and folders

How do I unlock files and folders so I can delete them? I have Bakno Pinball version 9.0.0.0 and want to delete it so I can load and run the newer version. The files are locked and I cannot unlock ...
1
vote
0answers
531 views

Setting no proxy, proxy and Authenticating network from terminal [duplicate]

Somehow I can not access my desktop and have access to command-line. I can ONLY see wallpaper after login (no icons), I think I messed up with lightdm. Other posts suggests that I can reconfigure it ...
13
votes
7answers
4k views

How to delete files listed in a text file

I have a text file that has a list of paths to various files. Is there a command I can use that will iterate through each line and delete the file at the stated path?
0
votes
1answer
128 views

Custom terminal function to change text case

I'm looking for a custom terminal function change_case that will function as below to help me manage my titles on my website: change_case [option] "string" option: upper - STRING TO UPPERCASE ...
-1
votes
1answer
846 views

how to access my Android phone from my terminal?

I plugged my Kit-kat android phone up to my Ubuntu 14.04 computer and I enter the terminal and I want to be able to access files on my phone like the media and music folders through the terminal... is ...