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

learn more… | top users | synonyms (5)

2
votes
1answer
177 views

syntax highlighting with less, trouble with lexer

I have installed python-pygments and using it for syntax highlighting with less as described by mankoff here I put a function in my .bashrc cless () { pygmentize -f terminal "$1" | ...
3
votes
3answers
362 views

How to pipe/dump clipboard contents to a file?

I want to pipe/dump the contents (esp. text) of the clipboard/Ctrl+C to a file, preferably using Bash or Perl (in order). I'd rather not use GUI applications please.
2
votes
2answers
232 views

Show full server name in command line

I have several servers that have the same prefix in their name: mail.servername. When I have several sessions open (I use PuTTY from Windows 7), it is a minor PITA to figure out which one is which ...
-1
votes
2answers
5k views

Bash return permission denied error when I redirect the output of ls to a file [duplicate]

I'm currently studying shell commands, one of the exercises consists in creating a structure with various directories and subdirectories. I wrote ls -laR > hello, it was supposed to create a text ...
1
vote
3answers
86 views

How to determine command location?

I need to use keytool and I want to use possible newest version. I have on my Ubuntu oracle jdk, and OpenJDK. ~$ java -version java version "1.7.0_25" Java(TM) SE Runtime Environment (build ...
3
votes
2answers
1k views

Remove last three characters from all files in a directory

I have a directory with about 10 files and I want to remove the last three characters from the names of all of these files. Anyone know a terminal command that can do this? And separately, how would ...
0
votes
3answers
340 views

Vim AutoComplPop issues?

I need auto-completion in vim for programming languages, for that I downloaded the AutoComplPop followed the instructions mentioned there and copied the files cp -r ...
2
votes
2answers
1k views

Mount from rc.local fails; how to do it properly?

Here is my current /etc/rc.local: #!/bin/sh -e # Test 1 echo line1 > /home/myHome/rclog.txt # the mount mount /mnt/mediaDrive &> /home/myHome/mountlog.txt # Test 2 echo line2 >> ...
0
votes
2answers
104 views

Find a symbolic link or a record in “~/.bashrc” for a file

I have some command I can run directly from the terminal: my_command and it runs well. However, I want to disable it to run this way. I know where it's located: which my_command and it gives me ...
3
votes
3answers
446 views

Executing vi on directory does not list files

This seems like a new bug (feature ?) that’s creep into Ubuntu 13.10. When I execute vi on a directory it doesn't list the files which I can navigate to with the arrow keys; it just shows an empty ...
0
votes
1answer
129 views

Why does my computer show multiple terminals open Ubuntu 13.10

I am running a c program that records the number of terminals open and then lists them but when I run it I am shown multiple terminal windows open when only the one is, why?
1
vote
2answers
925 views

Treat ssh terminal like it is local?

I'm trying to work on a computer remotely, but some of what I want to do involves calling GUI programs. I want them to open on the physical display of the remote laptop. Essentially my question is ...
0
votes
2answers
944 views

Crontab and sSMTP

My server is Ubuntu 12.04.3 Cron jobs are working fine. I can send emails through command line, either using mail, ssmtp or sendmail. I have set the correct email address on top of the crontab -e ...
3
votes
1answer
328 views

What do + and - mean in the output of jobs command?

I cannot find the answer anywhere. When i have several jobs that are in the background and i list them with jobs i get the following: [1] Stopped command1 [2] Stopped ...
0
votes
1answer
2k views

Add program to PATH [duplicate]

A new Question today :). I've downloaded Sublime Text 2 for Linux (x32). Now I want to add it to the PATH-Variable. How does this work? Greets, Baldoius
2
votes
3answers
232 views

What does the “-f” mean in dconf?

For example, I can reset the gnome fallback panel with dconf reset -f /org/gnome/gnome-panel/ The only thing I don't understand is the "-f" part. Can someone tell me what is does? Or is it just ...
0
votes
1answer
86 views

Locale reverts to old locale after exiting root?

Heyo~ I am having an issue whenever I change locale. At present, I am getting this error whenever I run the locale command. locale: Cannot set LC_ALL to default locale: No such file or directory ...
2
votes
1answer
167 views

Bash error when trying to execute a file

i am kinda new to linux and in programming so please excuse my lack of knowledge. I'm trying to run a basic program named trial.c with an executable file named trying but when I type ./trying in the ...
0
votes
1answer
27 views

Delete characters from cursor up to the beginning

I'm confused, ctrl+k deletes characters from the cursor up to the end of the line. But why does ctrl+u delete the whole line?
2
votes
0answers
429 views

Get binary delta-encoded recursive diff of two directories as single patch file in CLI (and online use)

Essentially, I am looking for a GNU/Linux tool, that could recursively iterate through two directories, find file changes/additions/deletions; and for all changed files, output a diff. This can ...
2
votes
1answer
125 views

Why there is no shell? [duplicate]

I downloaded the ubuntu operating system (Ubuntu 12.04.3) because i learn computer science , and for that i need the shell but on ubuntu there is no shell. Do anybody know why is that? or where i can ...
0
votes
1answer
305 views

Open files with vim in terminal

Is there any way to open file with vim in the terminal without typing file name, but for example then I see in the directory my file, go with arrow keys or something like that? I think I saw one of ...
0
votes
1answer
396 views

how to check if PPA is already added to apt sources list in a bash script

Do someone know how to check if a PPA is already added to my system before i add it with the add-apt-repository command in a shell script. That would be very helpful. Thank you.
4
votes
1answer
214 views

What was the difference between `sudo apt-get -f install` and `sudo apt-get install -f`?

What was the difference between sudo apt-get -f install and sudo apt-get install -f commands? I had seen these two commands large number of times,is there any differences in functionality of these two ...
1
vote
2answers
119 views

why sh and ./ providing diffent output for the same script

$ sh emp1.sh Enter the pattern to be searched: $ ./emp1.sh Enter the pattern to be searched: \c Contents of emp1.sh script $ cat emp1.sh #!/bin/bash #emp1.sh: interactive version uses read to take ...
1
vote
1answer
273 views

Invalid argument argument when moving files

I am trying to move all files in the current directory to the directory GuardDog-CMS. Now all the files are actually identical, but the files in the current directory are more up-to-date. So when I do ...
0
votes
0answers
25 views

Subversion thinks all files are empty

For some reason when I do a diff my subversion thinks that I have deleted every line in every file for the repo. If I do a diff with git it looks something like this: diff --git ...
1
vote
1answer
270 views

Loop terminal command for combining PNG to GIF animation

I am trying to combine some PNG images to make a GIF animation. To do this I have installed ImageMagic and am trying to execute the command: convert -delay 10 -loop 0 inputfiles*.png animaion.gif ...
5
votes
2answers
1k views

Is it possible to translate words via terminal?

I would like to translate words from English to Language X trough terminal If it is possible, what kind of dictionaries there are? Is it possible to use online services like webxicon.org trough ...
2
votes
0answers
4k views

How to increase or decrease system volume from terminal? [duplicate]

How to increase or decrease overall system volume from terminal like I was doing it in the GUI?
0
votes
0answers
262 views

Netflix-Desktop posts an alert and an unexpected server response when I try to start it from GUI

So my problem is, "when I start netflix-desktop from the icon on my Ubuntu 12.04LTS desktop it opens the window with and 'alert' dialog box and then the 'webpage' that says unexpected response from ...
0
votes
1answer
100 views

Odd error message when I open terminal

When I open terminal, I get the following error message: No command 'expert' found, did you mean: Command 'expect' from package 'expect' (main) expert: command not found No command 'expert' found, ...
2
votes
2answers
236 views

Simple CLI to append one file to the end of another

If I have two text files, file1.txt.and file2.txt, how do I append the contents of file2.txt to file1.txt (without overwriting file1.txt) using a simple command-line?
4
votes
2answers
11k views

Command to open new tab in the current terminal

Is it possible to open a new tab in the current terminal with some commands?
0
votes
0answers
26 views

Boot failure after fallback grapihcs driver doesn't load - can't figure out how to fix problem via live disk

I'm almost positive the issue is that there are 2 graphics kernels, however I can't get past the boot to rectify the situation. I tried via terminal on a live cd but I can't figure out how to run the ...
0
votes
1answer
165 views

run a script as non-root user

I want to run a script say some_script.sh(that requires root permissions, contains some sudo do something in a for loop) as non-root user. I have a script as shown below. I want to run this script as ...
3
votes
1answer
818 views

turn on off bluetooth from shell not from applet

Ubuntu 13.04 64 bits, on ELiteBook 8740, gnome desktop with bluetooth-applet shown. I could not figure out how to turn on and off from shell the buetooth and not from the notification bt applet ...
0
votes
2answers
44 views

Resetting an alias

In my .bashrc file I created a new alias: alias source=mvn eclipse:eclipse -DdownloadSource=true -DdownloadJavadoc=true I executed source .bashrc, however I realized the horrible mistake I made and ...
0
votes
1answer
39 views

Customise the prompt and display the Battery Capacity?

How do I customise the zsh-Prompt to show for example the time, the wi-fi status and the Battery Capacity? Is it possible to see my current battery charge in the prompt? I have only found a way how ...
1
vote
3answers
598 views

Finding certain strings with grep (or similar)

I have two parts of a string that I know, called phrase1 and phrase2 that are in the same line of a file that occur multiple times throughout the file. I need to extract these lines from the file; ...
1
vote
1answer
73 views

How boot to terminal Ubuntu 12.04 MacbookPro

I tried to boot into terminal with ctrl+alt+t in my ubuntu 12.04 mbp, but it always boot into GUI. How can I fix this ?
0
votes
2answers
1k views

How to run bash commands in Ubuntu 13.10? [duplicate]

before in Ubuntu 12.04 when I make simple bash commands, it works but in Ubuntu 13.10 I can only open it with gedit! How I can run it by only one click?
1
vote
4answers
12k views

how to logout from terminal in 13.10? [duplicate]

I have seen some previous post about logout from terminal but those were for old versions. I didnt find the way for logout in Ubuntu 13.10 from terminal. How can I logout from terminal in Ubuntu ...
3
votes
1answer
61 views

Move GZ archives with specific content

After a restoration of my HDD with PhotoRec I have a folder with 36,500 GZ archives. Of those, around 200 are very important for me. Each of these archives contains exactly one TAR archive. These TAR ...
1
vote
3answers
444 views

How to lock a folder from terminal

Is there any way to lock a folder from terminal(protected with password) without using any third party applications like truecrypt,crypteeper nor giving user permissions. It was just like whenever a ...
1
vote
1answer
2k views

saving xls as csv with libreoffice calc

I am using LibreOffice 3.5.7.2 Build ID: 350m1(Build:2) and would like to run LibreOffice calc from the terminal to open an .xls document and output to .csv. I can do this via the GUI by just opening ...
6
votes
2answers
612 views

Does the terminal store data?

This is something that I have wanted to know for a really long time, but never came around to actually posing a question. I know that in the terminal that is provided in Linux distros, the entire ...
0
votes
1answer
82 views

Upgrade problem. Can I switch to a window from command line ?

Here is what's happening. I started updating my laptop from 12.04 to the next one (command line) and was surfing the web. At some point everything vanished from the screen except the Firefox window ...
0
votes
1answer
92 views

./opt/lampp folder & file editing help

I installed XAMPP but I need to edit folders and files in there. I did the following groupadd lampp usermod -a -G lampp kyle chown -R root:www-pub /var/www chmod 2775 /opt/lampp find /var/www -type ...
0
votes
0answers
138 views

Ubuntu 12.04 boots to terminal every time after update

Ubuntu 12.04 boots to terminal every time. I can log into the terminal and get Unity going via startx to blank wallpaper then Ctrl+Alt+T terminal and unity --restart. This then gets everything ...