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

learn more… | top users | synonyms (1)

0
votes
1answer
335 views

Copying subdirectories with -r option not working

I just want to copy the contents of a directory and the subdirectories within it over to another directory in a Bash shell. I assumed cp -r would do this. However, this isn't working: cp -r ...
2
votes
1answer
1k views

How to grep output of ls -lhR / for particular owner (ex. root)?

Is there anyway I can list all the files that belong to a particular owner? Additionally can I list all the files that belong to a group?
1
vote
1answer
1k views

symbolic link to /opt

How do you : "Create as administrator (sudo) one link in /usr/bin to the command that you'd like to call (for example with8.5 and tclsh8.5). One time that you had create the links you can run ...
0
votes
2answers
338 views

Cat a command to file

My bash script does many things, among which creating another script. I would like to have the following line to be executed from within a script. But it does not work (grep is executed instead of ...
1
vote
2answers
431 views

-le comparison problem in bash script

I'm under Ubuntu 11.10, when I execute this program in bash I have the following error: exec.bash: line 25: [: 0.1: integer expected as an expression line 25 is: while [ $p -le 1.0 ] in the ...
2
votes
3answers
96 views

How to find source for a line in $PATH?

I've got a line in my $PATH that is invalid and want to delete it, but I'm not sure where it's coming from. It's not being set in .bashrc, .profile, or /etc/environment. Is there any way to figure ...
1
vote
1answer
79 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
9k 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
2k 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
2k 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
457 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
747 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
870 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 ...
4
votes
1answer
8k 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
589 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
341 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
478 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
7k 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
158 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
765 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
13k 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 ...
49
votes
4answers
75k 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
203 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
414 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
15k 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 ...
10
votes
4answers
6k 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
7k 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
190 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
478 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
24k 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
432 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
202 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
542 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
722 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 ...
44
votes
4answers
18k 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
499 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 ...