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

learn more… | top users | synonyms (5)

0
votes
3answers
3k views

changing shell from zsh to bash

My web server was tampered by someone who was using zsh shell. I feel more comfortable using bash shell, as that's the defaults that come with Ubuntu and OS X (the two main operating systems I use). ...
3
votes
2answers
3k views

history doesn't display as sudo user

On a few of my ubuntu installations, when I run sudo su and become sudo user, I can type history and view a list of commands run as sudo user. However, on my one ubuntu installation, for some reason ...
0
votes
2answers
73 views

How to restart the wireless with a changed configuration on command line?

I have a wireless device under the name wlan0 in Ubuntu 13.10. I want to change the configuration of a network to be found in the following directory /etc/NetworkManager/system-connections I would ...
1
vote
2answers
4k views

How do I get the filename from inotifywait events?

So I'm doing a simple inotifywait loop to watch for changes in a Bootstrap directory: while inotifywait -r -q --format %w bootstrap/; do echo "something happened" [[ $filename == *.js ]] ...
1
vote
2answers
501 views

Ubuntu 13.10 Server : wget changes the filename of downloaded file automatically

I have a simple shell script on my Ubuntu 13.10 Server to download all files in a list. filen="/home/chester/test/workobject.txt" dir_log="/home/chester/test" if [ -f "$filen" ] then cd $dir_log for ...
2
votes
1answer
506 views

The file or folder /home/XXX/… does not exist. and cannot be deleted

I have a small problem with Kubuntu. I cannot detele some folders and files, it always says to me, the file or folder /src/ doesn't exist? and now I need to delete them, but i don't know how. someone ...
2
votes
0answers
32 views

How to simulate an “application launch” (executing a .desktop file) from a script? [duplicate]

This question relates back to separating the Tor Browser from Firefox in the Unity launcher (I assume it applies to other DE's as well). The original question is here. As part of my proposed solution ...
1
vote
3answers
845 views

Maximize an application with known PID from CLI

I need to maximize the window of an application when it's minimized using the command line only.. So how to do that knowing the process ID. When working on the wmctrl command i got the following ...
0
votes
1answer
136 views

What does the commands `import gravity` and `import antigravity` do?

I want to know the use of import gravity and import antigravity. Is there any differences between these two commands? man import shows: the import program is a member of the ImageMagick(1) ...
1
vote
2answers
554 views

find .sql and .sql.gz files using find command

I have a shell script code which find .sql.gz files and moves them: find $Dir -type f -mtime $Time -name \*sql.gz | while read file do echo "Earlier $file will be moved to different folder." ...
2
votes
1answer
183 views

How do I start the Privacy and Activity Manager from command line?

This is the "Security & Privacy" dialogue in System Settings.
0
votes
1answer
86 views

Terminal update package

I recently installed Spotify which installed fine. However, I am now trying to intall a theme. When downloading the package in terminal (sudo add-apt-repository ppa:tiheum/equinox) that downloads fine ...
5
votes
3answers
2k views

How do I maximize an already open gnome-terminal window from command line?

I know you can open an new gnome-terminal maximized by using: gnome-terminal --maximize That is not my question. Is there a command that I can use to maximize the current terminal where I am in. I ...
0
votes
3answers
2k views

Linux equivalents of Windows / DOS terms [duplicate]

I am trying to adjust to Linux terms after many years of DOS and Windows. I have been wanting to switch from Windows to Linux for years now, but couldn't decide on a flavor. Today I got fed up with ...
3
votes
1answer
989 views

How do I recursively zip all subfolders in a directory?

Currently, I have this directory structure: /Downloads /Download 1/ /Download 2/ /Download 3/ ... I would like to have this directory structure: /Downloads Download 1.zip ...
6
votes
3answers
10k views

Mac OS X Terminal clone for Ubuntu

I would like to set the Max OS X Terminal theme for Ubuntu Terminal. I really like the fonts and the colors. This is how the Mac Terminal does look: Image source There are few things that I ...
0
votes
1answer
52 views

Graphical packages not installed by mistake, lubuntu

So I installed lubuntu on my new laptop, but when it came to choosing what packages to install, I accidentally didn't install anything including the desktop. Can anyone help me get a GUI and where I ...
0
votes
1answer
58 views

I have seen these in when trying to build a cross compiler what does these mean

../gcc-x.y.z/configure --target=$TARGET --prefix="$PREFIX" --disable-nls --enable-languages=c,c++ --without-headers export PREFIX="$HOME/opt/cross" export TARGET=i586-elf export ...
0
votes
2answers
7k views

What is the command to switch to normal user? [duplicate]

I am trying to "su/sudo" command to switch to a regular user. It asks me password and I enter admin password then it says su: Authentication failure. How can I switch to regular user, what is the ...
4
votes
3answers
28k views

How to open text, video, or picture files via terminal

I am new to ubuntu and I would like to know how to open a simple text file or open a video or a picture via the terminal
0
votes
1answer
101 views

Make a string from array of Strings

I have a piece of bash code, in which I would like to make a long string from an array of strings. The bash code is as follows: # Load all the SNPs arrSNPsToBeExtracted=( $( cat $indexFileName ) ) ...
-1
votes
2answers
1k views

problem with opening .sh file in Ubuntu 13,10

I have problems opening a the .sh file for Cytoscape in Ubuntu 13.10. I click on it but it does nothing! When I try to use the terminal it opens but shows lots of codes and does not run. Sorry if ...
2
votes
4answers
479 views

How can I (de)activate a PPA from the command-line with a single command?

Ubuntu offers an easy GUI interface that allows you to edit, (de-)activate and remove PPAs. But going through all the GUI dialogs and menus can sometimes be tedious, especially if you have a lot of ...
6
votes
2answers
21k views

Enable the keyboard backlights on supported Lenovo (e.g. Carbon X1) with command

Some Lenovo laptops have keyboard backlights, and they can be turned on using Fn + Space. There are three states: off, normal and bright. When I start Ubuntu, these laptops always default back to a ...
0
votes
2answers
53 views

How to find erase and line kill character for ubuntu 12.10

I'm new to Unix and have bought today a copy of "The Unix Programming Environment". I'm trying out the stuff from the book. But some of them are not working as expected like : To kill a line and ...
0
votes
1answer
101 views

Issues with SCP

I am having problems with my scp command on Ubuntu 12.04. I can't SCP anything to my AWS server with Ubuntu 13.10. The terminal tells me that I am scp: /index.html: permission denied. What am I doing ...
0
votes
0answers
65 views

Why I am not able to update my system with sudo apt-get update command? [duplicate]

I am trying to update using sudo apt-get update, but it do download some packages but after some times I get the following errors W: Failed to fetch ...
0
votes
1answer
55 views

Launching rmid problem on Ubuntu 12.04

I have java version "1.6.0_21" Java(TM) SE Runtime Environment (build 1.6.0_21-b07) Java HotSpot(TM) Client VM (build 17.0-b17, mixed mode) installed. When I type rmid in the command line, I get ...
0
votes
2answers
3k views

Terminal autocompletion 'tab' not working as intended?

I know this has been discussed on other posts but my problem does not seem to be fully resolved and I do not have permission to add a comment to those posts yet :( listed on help.ubuntu.com > ...
0
votes
1answer
1k views

sending message to printk buffer from user space — not working

Actually i want my driver messages to reach my terminal for debugging purpose. So i just try to check by following below link. I refred following link :-- http://elinux.org/Debugging_by_printing I ...
0
votes
2answers
1k views

How can I run gcp without an X server?

I installed gcp because I often copy large directories from one place to another and I want to see a progress bar to know how long it will take, but this is running on a minimal server so I don't have ...
4
votes
3answers
2k views

What's is the difference between “>” and “>>” in shell command?

Does anybody could explain to me the difference using > and >> when using shell command ? Example: ps -aux > log ps -aux >> log It seems results is the same.
2
votes
1answer
323 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
622 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
404 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
14k 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
272 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
2k 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
609 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
3k 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
189 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
806 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
136 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
2k 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
2k 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
451 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
9k 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
251 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
119 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
223 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 ...