Bash is the shell used in Ubuntu's command-line interface.

learn more… | top users | synonyms (1)

1
vote
1answer
76 views

How to identify an application executable from ps

If I execute ps -ef | grep java I get the following noaccess 12144 908 0 Apr 28 ? 697:47 /usr/java/bin/java -server -Xmx128m -XX:+UseParallelGC -XX:ParallelGCThreads=4 Though, in ...
6
votes
3answers
10k views

Daily cron job not running

A quick overview: I have a script that will daily backup my source code repository from SVN into a tarball for that day. I have tested the script and it works very well as long as I run it as sudo, ...
0
votes
1answer
8k views

Create a directory with mkdir from broad

I am using ubuntu 11.10 and I am trying to create a directory in my home folder from another place without changing any directory. The way I am currently using from it is : cd ~ mkdir ...
7
votes
1answer
1k views

PS1 problem, messing up CLI

I did a simple PS1 assignment PS1="\e[0;31m[\W]\$ \e[m " All I wanted to do was to change the prompt color and display only the relative path. However this messes up the CLI. For example, when ...
3
votes
2answers
1k views

how can a bash file run without needing to enter sudo pass-phrase manually?

I write a bash file thus: #!/bin/bash echo 1000 |sudo tee /sys/class/backlight/intel_backlight/brightness (that changes the screen's brightness) I need it to run at startup, but because ...
2
votes
6answers
2k views

climb up the directory tree faster

if I'm in a very deep directory a/b/c/d/e/f/g/h/i/j and want to come back a/b/c, I have to use ../../../../../../../. Is there command I can pass through a number, e.g. cd up 7, to speed this ...
3
votes
2answers
3k views

Python Compared to BASH

I've been studying bash for the past three weeks or so, and it is very easy to learn since it is basically just command line inputs. I've decided to now move onto python but I've been lost the whole ...
2
votes
3answers
441 views

Ubuntu Equivalent of portable executable file

I am developing an application which had some dependency and for that i use external tools. One example is that i use putty's commandline tool plink.exe to telnet/ssh remote machine from java program. ...
2
votes
1answer
700 views

Why must I do `. .bash_profile` every time I create a new alias?

Every time I add a new alias in my .bash_profile file, I found that I must do the command . .bash_profile in my terminal to make it work. Why does the alias not work automatically?
0
votes
0answers
383 views

How to change the root password on Ubuntu 11.10? [duplicate]

Possible Duplicate: How to know my root password? I am using Bash. I have a freshly installed Ubuntu 11.10 and I need to change the password.
1
vote
4answers
4k views

How can I run this script on startup, restart, and shutdown?

I'm using Ubuntu 11.10. I've written a script, that synchronises a directory in ~ with a directory on /dev/sda4, using Unison. Before, I had this script running every five minutes with no problems, ...
2
votes
2answers
820 views

Why wont my pipeline work?

I am trying to make a bash script that will find all the mp3s in my Downloads folder and move them into a music folder. Why won't this line work? find ./ -type f -name \*.mp3 | mv *.mp3 ...
3
votes
1answer
7k views

How to unzip files into the current directory?

I am trying to write a bash script that will automatically unzip mp3 downloads and move them into my ~/music folder. My problem is that when I use the unzip command, it creates it's own folder ...
1
vote
2answers
574 views

asked for sudo password, post login to bash shell

With 11.10 when any of my users with the bash shell login upon success they are asked to provide their sudo password e.g. Last login: Fri Jan 20 19:13:36 2012 from x.x.x.x [sudo] password for *user*: ...
3
votes
1answer
329 views

How can I find which song is currently playing programmatically?

I'm trying to make a little bash script which I could call with a keyboard shortcut and which could detect which song is currently playing and vote it up or down, stuff like that. How can I get ...
1
vote
1answer
468 views

Command line backup of my DVD

I am trying to follow the directions to create an automated backup from this site for my 11.10 machine: http://ubuntuforums.org/showthread.php?t=363666 The DVD that I'm working with is a Memorex ...
7
votes
2answers
6k views

What is the bash equivalent of DOS's pause command?

I need a pause on a shell script to show a warning before continuing. For instance, on DOS it goes like this: doit.bat: [...] echo 'Are you sure? Press Ctrl-C to abort, enter to continue.' pause ...
3
votes
2answers
3k views

What is the difference between “source x”, “. x” and “./x” in Bash?

I have one bash source run.sh as follows, #!/bin/bash if [ $# -ne 1 ]; then exit fi ... when I execute it in two ways, there are different behaviors. The first way is, source run.sh It will ...
2
votes
1answer
2k views

Mplayer does not work anymore and I don't know why or what happend

Whenever I try and sue mplayer it says: mplayer: relocation error: mplayer: symbol ff_codec_bmp_tags, version LIBAVFORMAT_53 not defined in file libavformat.so.53 with link time reference What do ...
-1
votes
1answer
2k views

“sudo update-alternatives --install /bin/sh sh /bin/bash 1” returns “command not found” [closed]

I've searched all over the web for a solution to this issue, with no success. I retrieved this command from this forum answer. But this only returns for me: sudo: udpate-alternatives: command not ...
0
votes
2answers
148 views

Is there an alternate keyboard combination for the Up key in bash?

I recently discovered that, in a terminal, Ctrl-i is the same as Tab (which is very useful on my phone, where there are no arrow keys nor tab). On a normal terminal pressing the up key navigates the ...
1
vote
1answer
1k views

Why we can't run commands with gnome shortcuts?

When I make a custom shortcut with gnome (gnome-control-center keyboard) I can't set it to a command. Why? Example: I can't set a shortcut for sudo apt-get update. Instead I must first invoke a ...
1
vote
1answer
1k views

Want to write a simple SVN update bash script

I want to write a simple bash script that will update an SVN working copy in a given directory. The repository is accessed with the svn+ssh protocol. The basic process this needs to follow is: ...
1
vote
1answer
710 views

Linux command that builds a shell script automatically after you run a command

Alright I'm drawing a blank here but I know I used to run some linux command that would automatically generate a shell script for me based on how i interacted with the shell. Example: If i remember ...
3
votes
4answers
12k views

Using the Terminal in Ubuntu to change directory

I have a question about using the terminal in ubuntu 11.04.I have installed wine and steam and civ III thru steam.According to instructions on wine forum in order to play civ some font files need to ...
45
votes
4answers
65k views

Running programs in the background from terminal

How do I run a program in the background of a shell, with the ability to close the shell while leaving the program running? Lets say my UI is having problems or for some reason, I need to boot up a ...
1
vote
1answer
199 views

Scripting question (youtube-dl and xclip)

I have youtube-dl and xclip installed. Is there a way I could write a script that can run commands from both? For example: youtube-dl -l --extract-audio (url) but instead of pasting a url could I ...
0
votes
3answers
4k views

Anomalous result using bash “set” command

When one issues the set command without arguments at a bash prompt (which should output a list of shell variables and their values), a script of 8,274 lines scrolls by. Examining this script shows ...
2
votes
1answer
408 views

Script to login and load main gui in Ubuntu 11.10

I have a RFID reader interfaced with an Arduino microcontroller left over from a past project, which I would now like to use to automatically login on Ubuntu 11.10. What I'm imagining specifically is ...
2
votes
3answers
14k views

Desktop directory not opening

I am completely new to Ubuntu or any distribution of linux altogether. While using the terminal, when i am in the /home/username directory the ls command shows Desktop and Download directories but the ...
9
votes
4answers
5k views

Autocompletion doesn't work while logged as root

I have just came across something that is really bothering me. Autocompletion on ubuntu works like a charm but when I login as root, e.g. su I get tab autocompletion only sometimes. Why does it work ...
6
votes
1answer
6k views

Cannot echo “hello” > x.txt even with sudo? [duplicate]

Possible Duplicate: sudo & redirect output I'm trying to create a file in /var/www, but even with sudo this fails: user@debVirtual:/var/www$ sudo echo "hello" > f.txt -bash: f.txt: ...
0
votes
2answers
3k views

How do I determine the Mime type of a file?

I recently switched to gnome3 and was surprised to find that there was no way by which we could set the default applications. I am writing a nautilus extension using bash. I want to find the mime ...
1
vote
1answer
185 views

Unable to press 'E' key in bash when I add export EDITOR=vim in /etc/inputrc

When I add the line export EDITOR=vim into /etc/inputrc and start a new session in BASH, I am unable to press the E key on the keyboard. (Well, I can press it, physically, but nothing shows up in the ...
2
votes
1answer
442 views

delete files with particular character length and a extension in a directory using some command in terminal window

I would like to know what command must be executed in the terminal window which will enable us to delete files with a particular extension(say .c) in a particular directory whose name length is 6 ...
6
votes
6answers
22k views

How do I change my PYTHONPATH to make 3,2 my default Python instead of 2.7.2?

I have python3.2 located in /usr/lib/python3.2. I am not sure if that means it's installed but I assume it is for now. Some facts about my system: $ which python /usr/local/bin/python When I type ...
5
votes
1answer
1k views

Cancel Process with Ctrl + C will not work in Terminal

I have just got myself a Ubuntu server and for some reason the Ctrl + C will not kill the process I am running. I have run this command on two terminals Cygwin and putty and logged in using ssh. I ...
1
vote
1answer
424 views

Error message when open terminal

This appears when I open the terminal: bash: export: `=': not valid name bash: export: `/home/(my account ...
2
votes
1answer
200 views

Gnome Tweak Tool editable via bash/python?

Is there a way to access the variables to edit via bash (or other libraries with bash or python)? Similar to how you can use 'gconftool-2' in bash to edit properties that would update them after ...
5
votes
2answers
538 views

Help understanding command line

We are starting our Jenkins CI with the following bash command that I would like understand. Could someone explain what is doing (the only bit I get is "java -jar jenkins.war"). Thanks! nohup java ...
2
votes
2answers
695 views

open multiple instances of a (.pdf) file

I would like to open multiple instances of the same file with some sort of command. I've tried some very unsophisticated ideas (e.g., an alias or function in my .bashrc, a simple shell script), but ...
38
votes
4answers
14k views

How to see the command attached to a bash alias?

Suppose I have an alias in the bash shell. Is there a simple command to print out what command the alias will run?
1
vote
1answer
1k views

Named pipe getting “clogged”

for elem in {1..99} ; do echo $elem> mypipe ; done This piece of bash code should pass 99 ints through the pipe, which previously, in another terminal had this set: cat <mypipe Does anyone ...
2
votes
1answer
461 views

Run default mail client

To run the default web browser or terminal there are commands like x-www-browser and x-terminal-emulator. There are other alternatives for common programs. Is there a similar command to run the ...
2
votes
2answers
1k views

create .xml file with data from bash

I am trying to make a .xml file, the bash command need to copy this block of code, and replace the CITY-FROM-TEXT-FILE-LINE-1 attribute from city.txt (one city per line) <ss:Row ss:Height ...
3
votes
1answer
660 views

How can I make a music playlist out of a .txt file?

I am using Ubuntu 11.10 (I don't think that really matters) with Bash. How can I make a music playlist out of a .txt file? It is a command but I forgot it. I would appreciate it if someone would ...
0
votes
1answer
76 views

Command who question [duplicate]

Possible Duplicate: What is tty7 in the commandline? Why when I type the command who does it show my_username tty7 my_username pts/0 Shouldn't it just show one? Why am I logged in ...
0
votes
1answer
159 views

Using a custom list for autocompletion (e.g., a list of files)

what I would like to do is when I write inside on console a command, for example. ls file1.txt folder1 folder2 then I write cd (I hit some magic shortcut and I can access using down ...
1
vote
1answer
107 views

Can't install libmodman from source

I have this file libmodman-2.0.1.tar.gz, and want to install it, so I extracted it, navigated to the directory, then ./ configure and I get this : ~/Downloads/libmodman-2.0.1$ ./configure bash: ...
1
vote
5answers
2k views

How to kill only if process is running?

Currently I use line like this in my sh script file: kill `ps aux | grep -F 'myServer' | grep -v -F 'grep' | awk '{ print $2 }'` But I wonder how to call it only if process (myServer here) is ...