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

learn more… | top users | synonyms (5)

4
votes
2answers
428 views

Command completion in R and python

In bash terminal, I could configure the command completion by inserting these lines to the /etc/inputrc file: $if Bash # Search history back and forward using page-up and page-down "\e[5~": ...
-3
votes
4answers
2k views

permission denied while making a file without asking for password

I'm trying to create a file using cat > list but each time it shows me "Permission denied". xyz@jaishreeram:/home$ sudo cat > list bash: l: Permission denied xyz@jaishreeram:/home$ sudo cat ...
0
votes
1answer
97 views

How would I display the lines that do not have certain letters? [duplicate]

How would I display the lines that do not contain certain letters? This is what I have already tried unsuccessfully to show the lines that do not consist of an a or b: egrep *[^ab]* filename
3
votes
2answers
5k views

How do I list word count in multiple files?

Say I need to find out how many words are in each file that have the word 'work' in it. I know that to find files with 'work' in it, it would be ls work. And to figure out the number of words it ...
0
votes
3answers
52 views

filename substitution — is there something to make sure it is not a certain letters?

What is the command for getting a filename with any character EXCEPT a few? Say I do not want the filename to contain the letters q and Q ls [^qQ] does not work. What would I do?
-1
votes
3answers
830 views

How can I execute c programs in ubuntu 13.04

I upgraded my ubuntu to 13.04 version. After this upgrade I am not able to execute c programs in terminal. When I try to execute, it shows an error as shown below bash: ./cd: Permission denied ...
2
votes
1answer
3k views

12.04 boots to command line

I'm running 12.04 LTS, and as usual when the package manager prompts me to update I do it. I updated last night (Sept. 27) and now the system boots only into command line mode. Before doing so I see ...
1
vote
1answer
165 views

rmdir on my machine doesn't have the -r argument

I checked the man page for it using man rmdir and all it has is --ignore-fail-on-non-empty, -p, -v, --help, and --version. What am I missing? I'm using Ubuntu 12.04 LTS
0
votes
1answer
725 views

How to display number of lines that are blank or contain these characters

I have to count the number of lines that contains comma, apostrophe, or is a completely blank line. I know to count the number of blank lines I would do egrep -xc '' filename But I am not so sure ...
-1
votes
2answers
153 views

Is there something in grep similar to what * is in filename substitution?

I am required to find all lines that start with a capital letter AND ends with the word dog followed by a period. I know that to find lines starting with a capital letter I would do: egrep ^[A-Z] ...
2
votes
1answer
2k views

Passing multiple commands to gnome-terminal from a script

My bash-script is not run in a terminal, but opens a terminal at runtime to ask for user input (sudo password). I would like to tell the user in this terminal what the script is trying to do. First, ...
1
vote
2answers
5k views

How to switch from GUI to CLI mode and terminate any GUI program?

I am using Ubuntu 13.04 64-bit. I need to perform some database benchmarks on my computer so I want to make it in strict terminal mode, without desktop. I know I can ctrl-alt-f1 to go to terminal ...
0
votes
2answers
540 views

Not able to change path to a directory in ubuntu

I need to change the directory to following path /media/New Volume/softwr/pgm and /home/sdk for 2 diff purpose. But by using cd its not working I tried cd media and cd home Both time its ...
2
votes
4answers
210 views

Using filename substitution — How to search for files with letters in this order?

So I need to find all files which have d, o, and g in the filename. The letters do not need to be side by side (aadaaoaagaa would be a correct filename, aaoaadaag would not be a correct filename). It ...
1
vote
0answers
197 views

Fresh installation of 12.04.3 or 13.04 always boots to terminal/graphical boot fail (AMD)

I'll just say that I am not experienced with Linux, and I've attempted to install Ubuntu on my Windows 8 UEFI laptop at least ten times this past month. I've tried the LTS 12.04 version which greeted ...
2
votes
3answers
282 views

How to make sure a 3 character filename contains one of 2 characters?

So I have to search a directory for files that are of 3 character length. That is easy, the problem is that at least 1 of the 3 characters needs to be either a "B" or a "y". I know that [By] would ...
0
votes
1answer
1k views

Running .py python scripts from the command line using python3

I am currently able to run .py python scripts from a terminal due, I believe, to this inclusion in my .profile file: export PYTHONPATH=/home/myplace/python python being the directory where I put ...
16
votes
3answers
50k views

What does 2>/dev/null mean…?

I want one or two line description about the following command line: grep -i 'abc' content 2>/dev/null
0
votes
1answer
54 views

Making the terminal interface non closable

Let me explain in more details. What i want to do is when i click the close button on the terminal interface, the terminal should not close. It should remain open. How can i do this. Thanks in ...
2
votes
0answers
119 views

call a modem using ubuntu and a iphone

I'm having a pc with ubuntu, and want to call a machine with a modem on it. The things I have in my work is the following, my pc with ubuntu, my iphone. Is it possible to call ( in this case a ...
2
votes
2answers
1k views

Rename files numerically (date/time order) [duplicate]

I have 200 files in a folder which I downloaded. I downloaded them in a certain order -- often only a few seconds apart. I would like to append a number to the beginning of each of the files. So the ...
0
votes
1answer
237 views

Capturing text output to a log, while printing REALTIME to terminal

My output prints approximately 1 line per second to the terminal, maybe 100-200 lines in total. I've tried to capture the output using tee, but it prints all the lines at the end of the process, not ...
1
vote
2answers
4k views

Compile .less files into .css after every update

I have installed node, and npm. With npm I downloaded less. And when I do lessc styles.less styles.css -x -w in terminal, it compiles and compresses the code, but doesnt watch the file for ...
0
votes
1answer
54 views

tar inexplicably trying to open a non-existent directory

I was trying to set up a script to download and untar some sources in a build script, but for some maddening reason tar seems to have gone insane, where it constantly attempts to do something with ...
1
vote
0answers
18 views

How come my terminal's character spacing is off unless I uncheck “Use the system fixed width font”? [duplicate]

My terminal looks like this: unless I uncheck "Use the system fixed width font" in which case it looks like this: I noticed that the character spacing is off for applications other than the ...
4
votes
6answers
5k views

What does the 'grep' command do?

I would like to learn how to use it so I can start to use the terminal more.
1
vote
1answer
67 views

Giving Command to particular USB Port

I want to execute adb command from terminal. But I am unable to use adb -s <ANDROID_ID> *command* since all the devices have same ANDROID_ID. Is it possible to execute adb command on particular ...
0
votes
4answers
234 views

The meaning of ./ before a command [duplicate]

While I was executing a C program in terminal I wrote: gcc -o demo demo.c ./demo Actually my doubt is why we write ./ before demo and what does it mean?
2
votes
2answers
7k views

Why service restart fails with :-restart: Unknown instance:

root@kumarswamys-desktop:/etc# sudo /usr/sbin/service vsftpd restart restart: Unknown instance:
0
votes
1answer
19k views

How to go to a folder in Terminal [duplicate]

I'm new to Ubuntu and I need to know how I go to a folder on my desktop in Terminal. I also need to extract a file from the folder if you could tell me where to put the command to extract it as well. ...
4
votes
2answers
332 views

How do I detect if I'm in a 'full screen' bash shell or GUI terminal window?

I have some code in my .bashrc that sets the terminal window title using the currently running command and it works great in Unity, where the terminal is in a window. However, when I'm logging in ...
-1
votes
1answer
300 views

How to install class bench using make all and bashrc [duplicate]

Class bench is program for Linux,Classbench duty is create packets and generate some rules which they call them filter set.In class bench there is three folder: trace_generator db_generator ...
2
votes
1answer
441 views

Is it possible to rotate a video using avidemux command line?

I have a number of video files (MOV) which I only need to rotate 90° clockwise. As it may be needed in the future as well, I first tried using ffmpeg and then mencoder command line in a Nautilus ...
0
votes
1answer
52 views

Log commands executed in ubuntu

Is there a way to monitor commands that are executed on an ubuntu system? basically i am looking for something like a key logger but only for commands executed.
3
votes
1answer
4k views

Run different java based on command line parameter

I have multiple java installations on my machine and need to use different versions all the time. I have found that the currently used JVM can be changed by the commands update-alternatives and ...
3
votes
4answers
8k views

What does the '|' (vertical bar) character mean in a Terminal command? [duplicate]

Example: In a Terminal command xdpyinfo | grep resolution (that I have taken from an answer), does the | character mean that the xdpyinfo output shall be sent to the grep program input for printing a ...
-1
votes
2answers
149 views

How to install apps by Terminal? [duplicate]

I'm new to Ubuntu and I want to know how to install a program which is compressed in the format tar.bz2 or tar.gz.I downloaded an app called Prozilla and it was compressed.I extracted it and it exists ...
1
vote
2answers
3k views

Why does my Python script fail with syntax errors?

While running the simple Python program below, I'm getting the following error: ./url_test.py: line 2: syntax error near unexpected token `(' ./url_test.py: line 2: `response = ...
4
votes
1answer
19k views

The fastest way to create a file from a terminal

What is the simplest way to create a file using a command-line? Usually I use: touch filename But is this the simplest/fastest way?
1
vote
1answer
2k views

Check available webcams via command line

is there a terminal command that lists all the webcams connected to my computer, including the native one? Maybe using ffmpeg package?
1
vote
1answer
6k views

Start Skype call from terminal

is there a way to start a Skype call from the terminal? I have found skype4py, but it doesn't work on ubuntu 12.04. Is there a solution without downgrading?
0
votes
1answer
8k views

How to upgrade using terminal [duplicate]

How can i upgrade my existing ubuntu 12.04 to 13.04 using terminal... please help me with the procedure. I am having problem regarding upgrade.
2
votes
2answers
4k views

Remove part of file name using for loop in terminal

In terminal using for loop we can add a part before or after the file name. But if we want to remove it how do we do this? For example we can add .old after all .txt files name using the command ...
0
votes
2answers
2k views

Scheduled task with at command (6AM)

im gonna reboot my server 6am every day, if my internet get disconnected and DDOSed. Does anyone have an idea how to do the command "at" at a specific time, and "AM"? Thanks- My computer clock doesnt ...
1
vote
0answers
306 views

Unable to login after using kill -9 -1 [closed]

I was using my Ubuntu when suddenly, probably due to a lot of processes running, it stopped working. So I did Ctrl+Alt+F1, and then searched for a command to kill the process which was causing all the ...
1
vote
1answer
143 views

Start noip application before login

How to start noip2 automatically before login? I tried with this for 3 hours, editing /etc/rc.local, /etc/init.d/rc.local, running script /etc/init.d with update-rclocal, nothing seem to work, even ...
0
votes
2answers
1k views

How to permit SUID

I need to permit suid for my user account on my ubuntu 13.04. According to the mount command the bit flag for my account is nosuid. how do i change it to suid.
-1
votes
1answer
688 views

No '/etc' Files Created during Apache Installation

I have installed Apache using the follow command: ./configure --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre --enable-so make sudo make install Now ...
2
votes
1answer
271 views

Reconnect USB Modem every 12 hours

I'm planning on having a 4G LTE USB Modem plugged into a server computer at home. I will then go somewhere else. I'm afraid it will disconnect, and if it does not work I would have to go home to fix ...
0
votes
2answers
1k views

effective user id not changing when setting uid to root

I'm currently reading a book on programming with C, i got to a part where i got to write a program which will display the real uid and effective uid that the file is being executed on. After compiling ...