General :: Modify My PATH In Ubuntu Bashrc For A Software

Jan 25, 2011

I was installing a software in my Ubuntu 9.10 and after installation completed it prompted the following warning:

Warning: Your PATH does not point to your newly installed /home/pc/Reflex/software/bin/esorex.

To ensure execution of the newly installed software you should modify your PATH.

Note that "esorex" is the executable file and by typing its name in the Terminal the program starts.

What should I write in my "bashrc" as PATH to that program?

View 3 Replies


ADVERTISEMENT

Fedora :: Add Path In .bashrc By Commenting Out Old Path And Adding New One - Command Source ~/bashrc

Jun 14, 2011

When I add some path in .bashrc by commenting out old path and adding new one like this:

#EXPORT HOME_PLAY=/home/gem/old_play
EXPORT HOME_PLAY=/home/gem/play
EXPORT PATH=$PATH:HOME_PLAY

After saving above changes, I enter the command: source ~/.bashrc Now if I do echo $PATH, the path shows both the old PLAY_HOME and new PLAY_HOME. This is really bad and messes up a lot of things in my project. This problem only goes away if I logout or reboot, a rather very long process. What is happening is that the old path is added to new path element and the old path includes the old path element you want to remove.

View 10 Replies View Related

General :: Modify .bashrc File To Change The HISTSIZE?

Apr 27, 2011

If I want to modify my .bashrc file to change the HISTSIZE would the following command be for example; HISTSIZE=200? And if I want to change the DEBUG_LEVEL to 8 would the following command be; DEBUG_LEVEL=8?

View 3 Replies View Related

General :: Get Path Of Sourced Bashrc File?

Feb 11, 2011

I want to assign the path of a sourced sub.bashrc file to an environment variable. E.g. if I type (or execute) from a known relative location

$ source ../../someDir/sub.bashrc

the sub.bashrc should set a variable like

export MyOwnLocation=/home/user1/unknownlocation/someDir

The problem is I can't use $0 as reference because the script is only sourced not executed. I also don't want to hardcode the path because the location might change and there will be more copies. Is there an easy way to create this information from within the the sourced bashrc file? I use Gnu bash 2.05b on Suse Linux 9.

View 6 Replies View Related

General :: Set Path For Different Software In The Bashrc File?

Aug 24, 2010

I have installed a software and set the variables in the .bashrc file to avoid setting them everytime I would like to run te software. Now I have installed a new software and would like to do the same thing in the .bashrc file.How can I add the path to the new software directory without affecting the first software path.

View 2 Replies View Related

Ubuntu :: Can't Delete - Modify .bashrc / Enable This?

Apr 18, 2010

Rm: cannot remove `.bashrc': Operation not permitted

* ALL other files in /home/admin directory are able, only this one.
* can't even change own, grp, just nothing
* no matter if i'm doing it from root or admin

inside this file there is code...

View 9 Replies View Related

Ubuntu :: Variables In .bashrc: How To Using Dir Path

Jun 20, 2011

I have what I hope is a fairly simple question to answer. In my ~/.bashrc file I can create this alias:

Code:
alias uChmodDP='chmod -R $1 $2' #specify permissions. and the variables work fine. But I cannot seem to get any love from this alias:

Code:
alias umnt='umount /dev/$1' I realize the likely problem is the variable following hot on the heels of a specific directory, but is there anyway to specify a variable in an alias like this? For some reason I cannot umount usb pen drives by right clicking, and have to always resort to the terminal to do so, which for me is no real biggie, but if I could create this alias it would be an even better no biggie to umount using the terminal.

Actually, the inability to right click to umount usb devices seems to be a Thunar issue since I run xubuntu. Using Nautilus I am able to right click and eject/safely remove devices. Using Thunar however, right click unmount always pukes back an error that the device must have been mounted on the command line or some such BS. But like I said it is no real biggie to use terminal, but an alias would be even nicer. I prefer using Thunar and Xubu most of the time b/c my laptop is quite underpowered.

View 3 Replies View Related

Ubuntu :: Export PATH To Adb Directory Through Bashrc?

Feb 25, 2011

I,m having a rough time getting the terminal environment to recognize my android debug bridge path (which is set in a separate hdd) I used to paste this in my bashrc, but then found that it would make the env system bonkers whenever i attempted sudoing with an option:

# Android Debug Bridge (ADB) sdk path
alias sudo='sudo env PATH=$PATH'
export PATH=${PATH}:/media/Disk/Linux/Android/sdk/platform-tools/
The "alias" line was the one making me have a rough time with env.
Now that i got rid of it everything is well but adb's path isn't exported anymore.

[Code]...

View 3 Replies View Related

Debian :: Find & Modify Path Statement

Jul 19, 2011

I am running Debian Squeeze, 64-bit.I would like to try my hand at bash scripting. So at the author's suggestion (first chapter of Chris F. A. Johnson, Pro Bash Scripting from apress) I created a /bin directory in my home directory. So now I would like to modify my PATH statement so that when I run a script from my bin directory my shell will find it.I did that. He then says that I should add this to ".bash_profile, .bashrc, or .profile depending on how bash is invoked." The find command is unable to locate any of these files. So I searched the forum, found the link above and tried to follow that. No luck so I assume that how Debian handles PATH statements has changed since that post?

I also have checked the wiki and worked Google as hard as I know how to do.Very simply where the heck is my PATH statement and how do I modify it?

View 4 Replies View Related

General :: Difference Between PATH=$PATH:$1 & PATH=$1:$PATH?

Jan 16, 2011

I found the following function in /etc/profile file.

[Code]...

1. I dont undestand what "if ! echo $PATH | /bin/grep -qE "(^|:)$1($|:)"" this if statement actually comapres??

2. Also what is the difference between PATH=$PATH:$1 & PATH=$1:$PATH

View 14 Replies View Related

General :: Move A File To Some Path And Create That Path When It Doesn't Exist?

Oct 8, 2010

I use this command:

Code:

find ./ -atime +360

to figure out the files that haven't been accessed since 360 days. The command above will return results like this:

Code:

/uploads/2010/02/some-file-name.ext
/uploads/2009/08/another-file-name.ext
... etc

I'm taking here about tins of directories, thousands of files. I'm looking to find a command that makes me able to move the results above to another path, and to create that path once it doesn't exist like below:

Code:

mv /uploads/2010/02/some-file-name.ext /old-files/uploads/2010/02/some-file-name.ext

But I want the executed command to create this path

Code:

/old-files/uploads/2010/02/

If it doesn't exist.

View 6 Replies View Related

General :: Forcing An Absolute Path Where A Relative Path Is Expected

Feb 21, 2011

I have a program that takes a relative path as input appends it to a some path string to get the actual path.

Now all I can input is the relative path. So if I want to go one level above my input will be ../mypath.

If I know the depth of the path used internally, I can use .. as many times to go to the root directory and then give the absolute path. But suppose I do not know the depth of the directory, can I construct a relative path string such that it considers it as a relative path. One way could be to have enough .. in the path string so that I can force an absolute path for some maximum depth of path.

Is there some path string syntax that I am not aware of but can achieve this?

View 2 Replies View Related

General :: Deleted Path Variable - How To Return To The Original Path Value

Apr 26, 2011

Experimenting with shell variables, accidentally deleted the path variable how could I return to the original path value. What kinds of problems will I have if I don't have a path variable.

View 3 Replies View Related

General :: Change Windows Path To Unix Path?

Sep 14, 2009

I have a path c:windowsackup I need this string to be changed into /windows/back/up I used the command -bash-3.00$ echo windackup | sed 's/\//g' but the output is windbackup

View 7 Replies View Related

General :: Change Absolute Path To Relative Path?

May 31, 2011

Current script:-

prefix=user@my-server:
find . -depth -type d -name .git -printf '%h�' | while read -d "" path ; do (
cd "$path" || exit $?

[code]....

How shall i go about changing the absolute path to relative path, so that /home/git/mirror/android/adb/ndk.git gets converted to /mirror/android/adb/ndk.git //echo <command> "$prefix$PWD.git" ?? - anything for relative path?

View 7 Replies View Related

General :: How To Edit The .bashrc

Feb 27, 2011

I want something like

Code:

export ROS_PACKAGE_PATH=~/ros:$ROS_PACKAGE_PATH

to be done already for me when I open a new terminal. How do I edit the .bashrc so that this variable is always set already?

View 3 Replies View Related

Ubuntu :: .Bashrc File - General Guide To Customizing It?

Mar 3, 2011

I want to play around my .bashrc file, but I can't seem to find a general guide to customizing it. I just want a guide that will show me examples and explain them in-depth.

Does anyone where to find one?

View 2 Replies View Related

General :: Appending To PROMPT_COMMAND In .bashrc

Sep 29, 2010

I have the following as my $PROMPT_COMMAND in .bashrc:

Code:
PROMPT_COMMAND='
if [ $TERM = "screen" ]; then
MYPWD="${PWD/#$HOME/~}"
[ ${#MYPWD} -gt 20 ] && MYPWD=..${MYPWD:${#MYPWD}-18}
echo -n -e "33k$MYPWD33\"
fi
'

I am trying to append items to my PROMPT_COMMAND in another script/on command line. If I do the following:

[Code]....

I get no error. I've echoed the value of $PROMPT_COMMAND in both cases and their output is exactly the same.

View 4 Replies View Related

General :: Echo Function In .bashrc?

Feb 25, 2010

I'd like a function in my .bashrc file that would allow me to pass text to it and echo the text to a specified file. I know it's simple as "echo 'text' >> file," but ideally, I would want to alias the function so I execute something like:

Code:
user~ $ write 'this is a test' with "write" being the function, and 'this is a test' being echoed to the file. I hope I explained that well enough.

View 3 Replies View Related

General :: .profile/.bashrc Not Being Read?

Apr 5, 2010

A cluster with a head node and compute nodes. An application with a couple of env variables (App_HOME, PATH) set in .profile (default shell sh). If I login to the head node/compute nodes on a terminal everything works fine. The correct env variables are set and the application works. However, when my application tries to do it, say ssh <compute node1> <application>, it appears the environment variables are not available. It only looks in the minimal /bin, /usr/bin type PATH. This tells that the .profile is not being read

View 2 Replies View Related

General :: .bashrc Ubuntu Eee Easy Peasy The Specifics Of An Alias?

Oct 21, 2010

I successfully edited the .bashrc file to get ruby version manager (rvm) working. Now I would like to turn that setting into an alias so that if i type the word 'ruby' into the terminal it not only goes to the rvm settup but also defaults to my webdev folder which is in my user home directory and also exicutes a command that will open up gedit ready to be used as the text editor for editing the .rb files. Can this be done i would settle for some added code for the 'if then' statement: so far it looks like this:

[Code]...

I don't want to mess with the default setup on this system too much and think things could get out of hand if i am not careful. So am cautious about doing anything at this stage. I wonder if it is possibel thought to setup that whole 'if then' statement as an 'alias'. I read a few referances to alias and looked in the manual like any good newby should but am needing your help please. getting out of the MSwindows mind set and into the linux logic is not so easy but is a great experience

View 13 Replies View Related

General :: Escape Commands In A Bashrc Alias?

Sep 17, 2010

I need to occasionally touch a file with the current timestamp as the filename. I would do so this way:

touch `date "+%Y-%m-%d_%H-%M"`.txt

However, I'd like to define an alias for this. When I try adding to the bashrc this:

alias td="touch `date "+%Y-%m-%d_%H-%M"`.txt"

the result is that the filename is the same during the entire session, since the `date ..` gets calculated just once during login...

How can I get the command to expand only when I call the alias? Or must I use a function for this?

View 1 Replies View Related

General :: Automate Sourcing .bashrc When Su - To Root

Oct 16, 2010

I need to source the my /home/me/.bashrc file every time I "su -" to root. Is there any way to automate this? I cannot edit any thing in the root's environment as it is shared by people.

View 7 Replies View Related

General :: Variable Expansion In .bashrc Not Working?

Feb 21, 2011

In my .bashrc file, I am attempting to set JAVA_PATH to a local path, using the HOME environment variable or '~' symbol as shown in the following examples.Using ${HOME}

export JAVA_PATH='${HOME}/Software/java/jdk1.6.0_24'

When I attempt to use ${JAVA_HOME} in a my ${PATH} javec is not found. To debug it, I tried a simple ls command:

ls ${JAVA_HOME}

and get the following error:

ls: ${HOME}/Software/java/jdk1.6.0_24/: No such file or directory

Using '~': Trying to use '~' symbol as follows:

export JAVA_PATH='~/Software/java/jdk1.6.0_24'

the ls command results in the same error, however javac is found.I prefer the '~' symbol anyway, but would like to understand why the ls command does not work for either, and why it seems as though ${HOME} is not being expanded.

View 2 Replies View Related

General :: Deleted .bashrc File Accidently

Apr 11, 2010

I accidently deleted my .bashrc file. I am a Debian user.Wat should i do??

View 7 Replies View Related

General :: Use Environment Variables In The .bashrc File?

Apr 16, 2011

I am trying to include my directory /usr/sbin in it's serch path for executable files using an environment variable. Would the input be: PATH="/usr/sbin"? And also upon start up, my shell should create the PRINTER environment variable which should resolve to the word sales...would that input be: PRINTER="sales"? If someone could help me with these two questions,

View 3 Replies View Related

General :: How To Create /.bashrc In My Home Directory

Nov 12, 2010

How to create /.bashrc in my home directory? do i make a folder naming it /.bashrc or i make its as a file?

View 7 Replies View Related

General :: Joining Two Commands In The .bashrc File?

Apr 15, 2011

attending class in the Redhat Academy Website. I was wondering how can you join the two commands of cd/usr & ls successfully in the .bashrc file?

View 10 Replies View Related

General :: Script After Putting The File In Bashrc?

Oct 23, 2010

I have a problem with my script. The problem is the system keeps rebooting after I put the directory file in .bashrc. The intentional for putting the file in .bashrc is to run the script automatically after login as root, I don know why is this happen. It was working fine for the first time without putting the file in bashrc. I could break the loop after hitting the "ESC" key. would it be the script problems?

Here is my script
count=20
while [ $count -gt 0 ];do
sleep 1
echo Press ESC to break the operation
((count=count-1))

[Code]...

View 11 Replies View Related

General :: Where To Write JAVA_HOME? In .bashrc Or In .bash_profile

Feb 9, 2010

Where to write JAVA_HOME? In .bashrc or in .bash_profile? What's the difference?

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved