The tag has no wiki summary.

learn more… | top users | synonyms

56
votes
8answers
64k views

how to set global PATH on OS X?

I'd like to append to the global PATH variable on OS X so that all user shells and GUI applications get the same PATH environment. I know I can append to the path in shell startup scripts, but those ...
24
votes
4answers
56k views

Adding a directory to $PATH in CentOS?

We just got our new server(s) up and we're running CentOS on them all. After successfully installing Ruby Enterprise Edition, I would now like to add the REE /bin (located at ...
17
votes
2answers
9k views

How to keep the full path with rsync?

When backing up with rsync, How do I keep the full directory structure? For example, the remote server is saturn, and I want to backup saturn's /home/udi/files/pictures to a local directory named ...
15
votes
4answers
52k views

Get directory containing the currently executed batch script

I use %0 in batch file to get the containing directory of the batch file but the result is :- c:\folder1\folder2\batch.bat I want just directory, without batch file name, like this :- ...
8
votes
3answers
8k views

why can't macports find make

I am trying to run macports like thus: port install php5 When I do so, however, I get this error: Error: Unable to open port: can't read "build.cmd": Failed to locate 'make' in path: ...
7
votes
1answer
475 views

Can't find binary, but path included in $PATH

So I tried to install Mercurial on Ubuntu 10.04. First I used the ppa repo, but got a pythonpath error, which I gave up on. Next try was install from source, everything went well, except it can't find ...
6
votes
2answers
415 views

How to change back to previous path quickly?

This is a basic linux question I think, but I really want to know. For example, currently I am in /usr/bin: [x@localhost bin]$ pwd /usr/bin [x@localhost bin]$ cd / [x@localhost /]$ Now I want to ...
6
votes
2answers
2k views

Environment Variables in PATH Not Expanded for non-Admin Command Prompt?

I have a Windows 7 machine which, when Command Prompt is run by a normal user, fails to expand environment variables in the %PATH%. If command prompt is instead run as administrator (right click, Run ...
5
votes
2answers
2k views

Windows: How do I add a program to the system's path environmental variable from the command line?

I'm looking to permanently add a directory to the %PATH% environmental available on a large number of Windows machines. Is there any way to do this from a command line (cmd) so I can script up a ...
5
votes
3answers
6k views

Window 256 characters path name limitation

after a long research, I finally found out that pathnames cannot be longer than 256 characters even in the latest Microsoft Windows 7. I really don't get it why there is such a stupid limitation, ...
5
votes
5answers
18k views

How can I modify a user’s PATH environment variable without logging out?

The question pretty much says it all; I have users who do not have permission to edit their own PATH environment variable and if they need to have it modified for some reason, they need to log out so ...
4
votes
3answers
546 views

Why is my $PATH variable for root different when I use su root

When I was trying to run chkconfig as an ordinary user (on CentOS 5) I realized that I could not access it because the directory, sbin, is not in my $PATH. When I su to root it still doesn't work. I ...
4
votes
2answers
5k views

CentOS /usr/local/lib system wide $LD_LIBRARY_PATH?

I install custom software in /usr/local/lib. How do I set the PATH and LD_LIBRARY_PATH in CentOS 6 system-wide to use /usr/local/lib. I realize there may be more than one way. What's the simplest and ...
4
votes
2answers
191 views

Is `which` lying to me?

I installed git via apt-get, but found that the version was hopelessly outdated, so I then installed git from source. The end result is rather puzzling: $ git --version git version 1.7.0.4 $ which ...
4
votes
1answer
2k views

IIS 7.5 (Express) applicationhost.config: Can a virtualDirectory's physicalPath be a relative path?

I'm configuring a site in applicationhost.config for IIS 7.5 Express: <site name="default" id="1" serverAutoStart="true"> <application path="/"> <virtualDirectory path="/" ...
4
votes
2answers
4k views

ErrorDocument in .htaccess, is it possible to use relative path?

This doesn't work: ErrorDocument 401 ../../src/wrong_pwd.php it renders the path as text, it really prints ../../src/wrong_pwd.php and doesn't output the real file. If I put the absolute ...
3
votes
4answers
384 views

How to avoid the ./ when executing a shell script?

I used to know a way to run my shell scripts just by typing there name as long as there were in my home folder or desktop. I hate having to type ./myscript.sh. I would like to be able to type just ...
3
votes
3answers
3k views

How does one escape the “ ` ” (accent grave/backtick) in a path?

I tend to prefix oft-used files and folders with the "accent grave" character (non-shift tilde, the back-tick, or plain-old accent, whathaveyou..), as it is easy to get at, and let's me sort things ...
3
votes
2answers
5k views

Windows Server 2012 GUI went missing after removing Active Directory

I'm sorry but i'm stuck in figuring out a problem i'm facing here. I removed the AD feature from server manager and after rebooting, my server 2012 gui wasn't there anymore. There's only command ...
3
votes
5answers
1k views

Prune duplicate entries from PATH variable

I modify my .bashrc frequently and then source it. However, when I have things like export PATH="~/bin:~/perl5/bin:$PATH" in my file, then the PATH environment variable grows every time I source the ...
3
votes
2answers
893 views

Running a program remotely with SSH, but it won't use my .bashrc and the PATH is wrong

I'm trying to run a command remotely with SSH, but my problem is that when I do that, my .basrhc doesn't get executed, and so the PATH is all wrong and my script is breaking. What I'm doing is ssh ...
3
votes
2answers
725 views

Where to set JAVA_HOME in Ubuntu

I am trying to configure Tomcat to know where JAVA_HOME is. I am used to Windows :) ...which file should I edit to add the Java info, and where is it located?
3
votes
2answers
1k views

Changing PATH Environment Variable for all Users. (Ubuntu)

I recently compiled Ruby Enterprise Edition (REE) on an Ubuntu 8.04 server. I would like to update my PATH to ensure this new version of Ruby (found in /opt/ruby_ee/bin) supersedes the older version ...
3
votes
2answers
3k views

pkg-config on Mac Doesn't find Libraries

I have been installing a bunch of libraries lately from the GNOME sources on Mac. They use pkg-config. Every time I run a configure, it complains that it can't find library XYZ, which I installed to ...
3
votes
2answers
54 views

Preventing bash tab completion of an environment variable with a FS path value from removing the environment variable name

Friends, I am using GNU bash as my shell on Linux: $ bash --version GNU bash, version 4.2.45(1)-release (x86_64-pc-linux-gnu) Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU ...
3
votes
1answer
647 views

How do you use environment variables, such as %CommonProgramFiles%, in the PATH and have them recognized by services.exe?

I'm trying to add C:\Program Files\Common Files\xxx\xxx to the system PATH environment variable by appending %CommonProgramFiles%\xxx\xxx to the existing path. After rebooting, I open a command ...
2
votes
5answers
233 views

Run compiled c program from any location

Quick question. After compiling a program, I always have to explicitly tell it to run from the current directory by prepending ./ to the name. For example $ ./testprog -argument1 Is there a way to ...
2
votes
2answers
148 views

Using 'which' command in cron job

I have a cron job that runs once a day on a Linux server and in the script it executes there is a test: # Validate ffmpeg is installed if [ $(which ffmpeg | grep -c "ffmpeg") -eq 0 ]; then echo ...
2
votes
3answers
2k views

IP address of virtual server?

I have a virtual server (shared hosting), with a domain name (and several sub-accounts, each one a separate site also with its own domain name) I was wondering if there was a way to find out the IP ...
2
votes
3answers
315 views

How should I protect against relative paths in urls that try to access files outside of the served directories?

How can I make sure I am protected against relative paths like: ...
2
votes
1answer
176 views

Is is better to edit the paths file or exporting PATH in .bashrc/.bash_profile?

I have noticed that almost every website tells you to add something like export PATH=/usr/local/share/python:$PATH in your .bashrc or .bash_profile when modifying a PATH. When you want to know what ...
2
votes
2answers
107 views

Powershell - can I avoid typing .\ if I want to execute something from the current folder?

I'm trying to switch from cmd.exe to Powershell, but I'm very annoyed by the fact that if I try to execute something from the current folder, I have to type .\ before it, just like in Linux. Is there ...
2
votes
7answers
439 views

How do I figure out which file is being executed?

I have two files: abc.exe and abc.cmd - both along the path somewhere. abc.exe is a command-line utility. abc.cmd is a wrapper around abc.exe. When I type "abc" in the command prompt, how can I ...
2
votes
3answers
92 views

how to get [ current_path ] in shell bash prompt?

Is it possible to have the name of the current working directory in the prompt in shell ? Im working on OSX and CentOS in multiple projects under /srv/... and a mistake for wrong directory is quickly ...
2
votes
1answer
1k views

Make IIS see updated environment PATH variable

We've installed Oracle Express on a Windows 2003 Server and in the process it updated the PATH. We're trying to get IIS to see this change in the PATH but we can't figure it out. We've recycled the ...
2
votes
2answers
306 views

Apache Error Log - “Web Path” instead of Filesystem Path

I'm running Apache on Linux and I'm using OpenSSH to provide SFTP access to some customers so they can upload their pages and also look at their respective site logs (access & error). I'm using ...
2
votes
1answer
42 views

Command Line Script Issue

I've been working on a batchfile script for a few weeks now that should automate certain routine tasks I need to perform during my work. However, I've stumbled upon a problem which I haven't been able ...
2
votes
2answers
46 views

Unix how to determine if a program can be executed

I am writing a script to create the source environment. Handling the PATH part is easy. Though how should I check if a program can be executed correctly when its path is added into PATH? Using which ...
2
votes
1answer
438 views

Robocopy uses relative path for Source and Destination paths

I'm trying to use RoboCopy in my TFS Build Template to copy some files, but for some reason it inserts "C:\Windows\system32" in front of my Source and Destination paths, even though I am passing in ...
2
votes
4answers
158 views

Editing $PATH in Linux

I'm working on a linux client and I need to add my home directory path to $PATH but I was unable to do that. I tried to find .bash_profile file and also .bashrc file but both are missing. Please let ...
2
votes
2answers
3k views

How to set PATH variable on Mac OS so that even non-terminal apps see it?

I need to add a directory to my PATH variable on Mac OS. I added it in .bash_profile and .profile, and that works for the terminal. But Emacs (http://emacsformacosx.com) still does not use the new ...
2
votes
3answers
5k views

How do I set the global PATH environment in a batch file?

The group policy in our environment overwrites the PATH variable every time I log on and, as I run a 'non-standard' computer, it gets it completely wrong (C:\Windows vs C:\WINNT, missing directories ...
2
votes
1answer
468 views

PATH issues for init.d scripts on startup

I have a simple script that starts up a unicorn instance (on Ubuntu 12.04LTS). #!/bin/sh case "$1" in start) echo "starting" cd /path && bundle exec unicorn -c ...
2
votes
1answer
466 views

Setting Apache's PATH environment to match users

Using PHP 5.3 as an Apache module with Apache 2, on OS X 10.7. When I open Terminal and enter echo $PATH I get: ...
2
votes
3answers
208 views

how to run mysql v5.5 on redhat linux

I am new to both linux and also mysql but somehow by obtaining help from net I have installed mysql v5.5 on redhat. It starts fine, I have confirmed this by running command: "/etc/init.d/mysqld ...
2
votes
1answer
40 views

Strange PATH when use sudoers via ldap

I have a working LDAP authentication environment. LDAP server is on ubuntu 12.04 machine while client are all centos 6.4 machines. Recently I configure sudoers in LDAP following this article ...
2
votes
1answer
1k views

mklink to network share or UNC path or Mapped Drive?

Are there performance or permission or other considerations to think about when using a mklink path to a network share versus just a straight UNC path (or mapped drive for that matter). For example, ...
2
votes
1answer
468 views

OSX problem starting FTP from preferences

When I try to enable the FTP service in the preferences (File Sharing->Options->Share Files and Folders Using FTP) the check box enables and then disables again. The console is giving me the message ...
1
vote
5answers
280 views

How can I modify path of a user with no home folder?

I have a user on my RHEL5 system whose home folder is /tmp. This user is for running some monitoring tasks, it doesn't represent a human being. What are the options for modifying this user's PATH ...
1
vote
1answer
177 views

Path Length in Windows

Is there any reason paths are still limited to ~250 characters in Windows? I'm not asking about a solution here (since there isn't one, other than \\?\ perhaps), but about why this is still an issue ...