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


ADVERTISEMENT

General :: How To Return Path To Its Original Value

Jul 20, 2010

Alex accidentally deletes his PATH variable.what are some of the problems he may soon encounter and explain the reasons for these problems. How could he easily return PATH to its original value?

View 14 Replies View Related

Red Hat / Fedora :: Appending A Path To PATH Variable Permanently?

Oct 21, 2010

how to add a path to PATH variable permanently so that it remains persisent even after closing shell and rebooting the system when i added a path, to variable it remained there as long as i didn't closed the shell. but when i reopened it ,changed were undone.

View 2 Replies View Related

SUSE / Novell :: Add Path To $PATH Variable?

Apr 19, 2009

I am trying to figure out how i can add the path /usr/sbin/ into the $PATH variable. I want this to be used from the normal account. I am bored settinh this manualy each time my computer starts.

View 2 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 :: How To Set The Path Variable

Jan 14, 2010

By mistake I have modified the PATH variable you know what a kind of mess it is.

Code:
echo $PATH

I just need to set the path variable again so I just need the format. Or can anybody come up with how to set the path variable.

View 6 Replies View Related

General :: How To Change The PATH Variable

Mar 12, 2011

I was changing my sudoers file to give permission of using "sudo" command to all root commands, asking for the password. It works, it's fine. The problem I'm having is with the variable PATH to my user, I think.

In terminal:
normal user:

Code:

ataias@ataias-notebook:~/Downloads$ echo $PATH
/usr/local/bin:/bin:/usr/bin
super user:

Code:

root@ataias-notebook:~# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:/bin:/usr/bin

As many commands are in /sbin/, root can use them without writing "/sbin/" but I can't do the same cause it's not in my path.

while root do this:

Code:

shutdown -h now

I should do:

Code:

sudo /sbin/shutdown -h now

and I want to use only

Code:

sudo shutdown -h now

I want to change my user's path variable to make it equal to root's path. how to change it? I don't know many things of shell still.

View 5 Replies View Related

General :: Change PATH Variable

Oct 16, 2010

I want to add my current working directory to the PATH variable and make it permanant in my .bash_profile so I can run my testscript without using the ./ charactors.can this be done?

View 5 Replies View Related

General :: PATH Variable Setup?

Jan 22, 2010

One of my colleague ran into trouble with setting up of path variable.

Earlier the entry for PATH in /etc/profile was:

Code:

Now what he mistake is:

He added a new Lines at the end as

Code:

Now due to this he is unable to run commmands now because that has overwritten the earlier PATH varaible.
If he types now:

It shows:

Code:

View 7 Replies View Related

General :: Set The PATH Environment Variable?

Apr 25, 2011

set the PATH environment variable?

View 4 Replies View Related

General :: Setting PATH Variable For New Users?

Jan 30, 2010

What steps have to be followed for having customized contents of PATH environment variable whenever new users are created? I require this in order to include a special directory into PATH variable; and this has to be a default one for all the newly created users.

View 3 Replies View Related

General :: How To Install Java - And Set The Path Variable

Oct 1, 2010

I have downloaded java and installed it with chmod +x and then ./bin package.

Hereunder is an output from CLI (putty)

I understand that the system knows the java is in a wrong place but if I do java -version it finds it correctly. I don't know and I don't understand how do I need to tell the OS that the java is somewhere else, I just did that with export java home and java path but still dosen't work, it keep tells when I do whereis java "java: /usr/share/java"

Here is another output:

View 10 Replies View Related

General :: Sudo Path Variable Error

May 28, 2010

I'm having a strange issue with the PATH variable when running the command 'sudo su'. When executing this command the PATH variable changes. No problems there, but it changes to:

Code:

Looking at this, there are two weird entries (//sbin and //bin) which should both start '/usr' instead. I'm not sure how I've managed to change this, or how a piece of software I'm using has done it (more likely it was me I expect), but could anyone suggest which file to look in to correct it? If it makes a difference the machine is running CentOS 5.

View 2 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 :: PATH Variable - Command Not Found On New Terminal

Aug 3, 2011

I am using CentOS5.5 & everytime it is showing command not found. If I export the path as below it will be working fine until a reboot. Again same error i.e command not found if I open new terminal. Every time I am exporting as below:

#export PATH=/sbin/:$PATH
#export PATH=/usr/sbin/:$PATH
#export PATH=/usr/bin/:$PATH
#export PATH=/bin/:$PATH

How can I set these permanently as that the paths should automatically be exported for everyone user whenever the system boots. And command completion also should happen for eg. #fdi (press tab), then it should show available options such as fdisk, etc.

View 7 Replies View Related

General :: Setting PATH Variable To Bin Directory In Ubuntu

Feb 18, 2011

I installed java in my pc by running the following on the shell
./jdk-6u24-linux-i586.
I need to set the path to the bin directory and also a new environmental variable JAVA_HOME.

View 2 Replies View Related

General :: Installed Qt Libs - Set Environmental Variable PATH

Sep 5, 2010

I have bash. I installed Qt libs and want to set environmental variable PATH, I tried some stuff from qt tutorials..

Here is what i tried:

Code:

and it does nothing so i tried

Code:

then checked path

Code:

Now there are two issues
1) the make gives error that header not found( probably make don't have the path)

2) when i closed the terminal and opened it again the PATH I newly entered was not there !

View 3 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 :: 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 :: Shell Script - Use Variable In A For Loop With Directory Path?

Jan 19, 2011

I modified files in several directories, and need to run a diff on the backup I created before modifying the file.

I'm trying to compose a simple shell script to speed up the task, but getting a syntax error.

Here is what I have:

for i in DIR1 DIR2 DIR3 DIR4 DIR5 do;
diff /maindir/subdir/subdir/$i/filename.txt.old /maindir/subdir/subdir/$i/filename.txt;
done

I know the paths are valid, and if I run just the diff command with the actual DIR1 instead of $i it works.

View 2 Replies View Related

Server :: How To Change Postfix Return-path

Nov 29, 2010

I just set up an internal mail server for my office using Postfix, Dovecot and Squirrelmail. It works great except for one tiny problem. When I send mail, I address it to user@myoffice (no .com, .net, etc) and it works perfectly. However, somewhere in my work, I screwed up and for whatever dumb reason put myoffice.net somewhere in there and now the return-path always shows up as user@myoffice.net instead of just user@myoffice. Does anyone know how to fix the return-path so that when someone clicks reply it goes to user@myoffice? I've Googled and searched here without finding my answer, apologies if it's out there and I've just failed to see it. Rest assured I have done a couple hours of searching before finally asking for help.

View 7 Replies View Related

Programming :: Return The Directories In Subject Dir, But Only The Directory Without Path?

May 21, 2010

Very new to this shell scripting/Linux scripting.

subject_dir=/labs/tricam/MERIT/MERIT_0*
for subject in `ls $subject_dir` ; do
if [ ! -d $subject_dir/$subject/feat/glm2010/doublegz/SRRTA.feat ] ; then

[code]....

View 1 Replies View Related

Fedora :: DNS Search Path Deleted?

May 13, 2010

I am trying to setup DNS domain name in my server (Fedora), which has static ip address.First, I put the DNS domain name in system-config-network->DNS->DNS search path. After restarting the network, it is deleted automatically.second, so I put the DNS domain name in /etc/resolv.conf as search mydomainname . After network restart, it is also deleted automatically.In both case domain name did not work (i.e, I can't connect to my server from outside using domain name, I can by ip address, internet is working fine).However, I found that the domain name is written in /etc/sysconfig/network-scripts/ifcfg-eth0 with search=mydominaname.

View 5 Replies View Related

Ubuntu :: PATH Environment Variable?

Oct 20, 2010

I have just installed Ubuntu onto my machine and my question is if it automatically comes with the PATH environment variable?If so, how do I add something such as python.exe to the PATH environment variable?

View 2 Replies View Related

Ubuntu :: PATH Variable Set At Startup?

Jul 29, 2011

I need to set PATH environment variables so they will be set every tie I startup ubuntu. Is there a startup script that will do this, and where is it located?

View 2 Replies View Related

CentOS 5 :: [5.4] Editing PATH Variable?

Dec 8, 2009

I didn't find this question in the FAQ or through the Search button.I added a server application and would like to update the PATH env't variable so that I don't have to type the full path for its binaries. I'd like to make sure I do it right: Do I just need to edit /etc/profile or is there another file somewhere in CentOS that I should use instead?

View 3 Replies View Related

Programming :: Java Applet Not Loading Image With Relative Path But With Absolute Path / Resolve It?

Jul 17, 2009

Java applet not loading image with relative path(e.g. images/1.jpg) but loads image with absolute path(i.e. from /root/user/images/1.jpg) . This is a problem when i want to host the applet on web server

View 2 Replies View Related

Debian :: Setting PATH Environment Variable

May 19, 2015

I have been trying to change my PATH environment variable to no avail. I am using Jessie i386 with MATE. Using my .bashrc file works but not well because with subshells the modifications get repeated. I want the change to occur on login.

I tried modifying ~/.profile ~/.bash_profile /etc/profile and /etc/environment and one or two others but in no case did my change get picked up even after logging out and in again and even after rebooting. I searched the Internet and found each of the above places to make the change but they don't seem to work with Jessie.

Where do I make the necessary change?

View 7 Replies View Related

Ubuntu :: Add PATH Variable In Root Terminal

Mar 16, 2010

I want to add a path (/usr/sys) to the global $PATH. I will use this to test commands and scripts, which I don't want to be mixed up with regular commands. I've added the path to /etc/environment. When I start a terminal session under my user account, the path is included in the $PATH variable. However, when I start a root terminal, it is not. Is there a way to to change $PATH on one place where it will also affect the root terminal, or do I have to change it on 2 locations?

View 4 Replies View Related







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