General :: Command Path Is In PATH But Bash Does Not Find The Command

Jul 12, 2011

kernel 2.6.21.5, slackware 12.0
GNU bash 3.1.17

Code:

As you can see, /usr/local/bin is in the path. However, bash does not look for nasm in /usr/local/bin.

If I am root, things go well:

Code:

View 16 Replies


ADVERTISEMENT

General :: Find Command To Search Wildcard In Path?

Dec 8, 2009

I need a command to search for any file in a directory like so:

/home/*/upload/* and then change permissions any file in that directory.

Find doesn't seem to match what I need.

View 12 Replies View Related

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 :: (Netstat -a Command) Why Some Sockets Do Not Have Path Name

Oct 15, 2010

When I run "netstat -a" commnand, it display:

Active UNIX domain sockets (servers and established)
Proto RefCnt Flags Type State I-Node Path
unix 2 [ ACC ] STREAM LISTENING 20269 /tmp/.gdm_socket
...
unix 2 [ ] DGRAM 997161
unix 3 [ ] STREAM CONNECTED 942628 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 942627
unix 3 [ ] STREAM CONNECTED 942626 /tmp/.X11-unix/X0 ....

Why some socket don't have Path name? And what mean's RefCnt = 2?

View 2 Replies View Related

General :: Command Line - Can Add A Shortcut To Replace A Path

Jul 24, 2010

For example, I always go to this path:

/user/something/somefolders/somewhere

but I don't want to type

cd
/user/something/somefolders/somewhere

in the terminal all the time, can I have some short hand to do so? for example, can I do something like

cd commandPlace

to replace the path?

View 5 Replies View Related

General :: Command Not Found For All But PWD And Echo - Path Empty

Mar 1, 2011

I logged into my Red Hat Enterprise Linux machine at work (use it for software development) and the primary GUI does not load. Instead, widgets appeared for xclock, xterm, and Firefox. In the terminal, I start typing in commands to try to figure out what's going on, but all commands are not found except pwd and echo. I 'echo $PATH' and that returns just an empty, blank line. 'echo $SHELL' lets me know I'm using cash.

The likely cause was my attempt to install Adobe Reader Firefox plugin yesterday. After it downloaded, I ran the binary but Firefox didn't seem to recognize that I had installed it, so I went into my .cshrc file and added the adobe folder to the path. That didn't seem to work, so I gave up, deleted the binary and the folder I installed to, and removed that directory from the path in the .cshrc file. This last thing (the export PATH line in that file) I'm certain is back exactly as it was before.

I have successfully added the /bin and /usr/bin back to the path from command line via
setenv PATH /usr/bin:/bin
but of course it doesn't stick after reboot nor does it magically load the primary GUI. I'd rather not go through the effort of creating a ticket for our company's Global Service Desk cuz there's no telling how long that could take to resolve. In the meantime, I can't do any programming.

View 23 Replies View Related

General :: Command To Get Install Path Of Applications/rpm Packages?

Jun 30, 2010

I am looking out for a command which can give me the list of applications installed and the corresponding install paths for those.let me know if there is any such command. Also, i am using rpm command to get the list of packages installed(i am assuming that this shows the list of applications installed).

View 4 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 :: 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 :: $PATH Variables, Soft Links, And Command Not Found?

Sep 17, 2010

I am having problems with symbolic links and the $PATH variable.I have a directory:# /usr/rulerX/squarewhere /usr/rulerX/square is a symbolic link such that:

# ls -la
square --> square.hg.current
My path variable is set as:

[code]....

View 2 Replies View Related

General :: Command For Finding File / Directory From Current Path

Apr 30, 2010

I am total new to linux as I worked mostly on RTOS (symbian). My problem is, I need to find the file IOSTREAM.H and I am following commands below:
1) cd /
2) find . iostream.h ( finds the file / directory from the current path)
It shows No such File or Directory

View 7 Replies View Related

General :: Command Line - Get Relative Path From Two Absolute Paths In Shell?

May 13, 2010

We have two paths. First one is directory, second either dir or file.

/a/b/c and /a/d/e.txt

Relative path from first path to second will be: ../../d/e.txt

How to get it in linux terminal?

PS: For those who ask "what is use case?" - creating lots of relative symlinks (just as an example)

View 1 Replies View Related

General :: Command To Get Source ( Full HTTP/FTP ) Path Of 'Installed' RPMs?

Jul 17, 2010

Is there a command to know " From where a specific RPM package was downloaded & installed ( The full HTTP/FTP path ) " ? For example, if I had previously installed Firefox from here [URL] is there a specific rpm query, or any other place, from where I can get the full ftp path back.

View 1 Replies View Related

General :: Result Of Type Command Is Hashed And Shows Another Path In Brackets?

May 30, 2011

I came across this reult of the type command (hashed) in another post. (see below).

Code:

fraespappp8:/data/apps > type topic_file_publish.sh
topic_file_publish.sh is hashed (/data/apps/pnbgstk/publication/topic_file_publish.sh)
This (result = hashed) is new to me.

I wonder which kernel/distro/shell it is from.

View 1 Replies View Related

General :: Write Shell Script That Takes A File Path As Command-line Arguments?

Dec 14, 2010

How can i write a shell script that takes a file path as command-line arguments.and it should report whether the path denotes a file or a directory.

View 2 Replies View Related

Ubuntu :: Sudo Not Picking Up Command In PATH?

Jan 20, 2010

On my Ubuntu server I'm running into an issue that I've never seen before even though I've been using Linux for many years. Basically sudo is not finding a command located in my path. Here is a transcript illustrating the problem.

Code:
prg ~: echo $PATH
/opt/ruby/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
prg ~: sudo echo $PATH

[Code]....

View 7 Replies View Related

Ubuntu :: Short Path On Command Line?

Mar 1, 2011

I have a quick question: how can I make the path short on the console? My problem is that if I descend 10 levels in a directory tree, the path becomes so long that it takes more, than one line of the console window. Is there a way to shorten it, and show only the name of the current directory, without the whole path, i.e., instead of

Code:
v923z@penguin: first/second/third/fourth/fifth/sixth/seventh/eighth/ninth/tenth>
only

[code]....

View 3 Replies View Related

SUSE :: How To Fix $PATH Variable - Command Not Found

Dec 20, 2010

I tried to install JRE to my remote Suse 11 SP1 linux.After i finished with files i typed like

export PATH=<my jre path>

now i have no bash commands - typing ls causes

-bash: ls: command not found

i think that i should re-export my PATH to the right value but i don't know what it should be. I tried differend values

/etc/profile
/usr/bin

View 3 Replies View Related

CentOS 5 :: Get Command Working Without Entering The Path?

Mar 3, 2011

For example, what I have now as a root user on CentOS 5.5:

# setsebool
bash: setsebool: command not found

I need to enter /usr/sbin/setsebool to get it working

The same is with some other commands:

# service httpd restart
bash: service: command not found

And so on. I know, that I need to add path somewhere, as I did it before on FreeBSD. But I don't know where?

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 :: 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

Ubuntu :: Specify Network Path Filespec In A Command Line?

Aug 24, 2010

I need to add a network path to a configuration file, but I can't figure out how to write the path.

The command dir \computernamesharename works in a Windows command line.

ls //computername/sharename/ does not work under Linux. ("No such file or directory.") ls smb://computername/sharename/ does not work either.

Nautilus shows the location as smb://computername/sharename/, and I can read and write in the shared directory, so it's mounted and I have access.

So how do I get it to work? How do I specify the path so a command line will recognize it?

View 3 Replies View Related

Red Hat :: Setup User's PATH Env When Sudo Command In RHEL5 ?

Dec 16, 2008

In RHEL5, the PATH of root is /sbin and /usr/sbin...., the PATH of common user has not /sbin or /usr/sbin, how to give the /sbin and /usr/sbin to a common user when he run command which sudo?

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

Ubuntu :: Java Set Path - Javac Command Doesn't Work

Mar 27, 2010

I have installed jdk1.6_0_0 to kubuntu 8.10. But javac command doesn't work yet.

How do I set path?

Here are the outputs i got from typign some commands

View 6 Replies View Related

Fedora :: Give The Command For Directory Path And Image Located Drive

Aug 28, 2010

problem during fedora x8664 installation. how to give the command for directory path and image located drive. the procedure to install fedora for the first time.

View 2 Replies View Related

Ubuntu :: Make Launcher On Desktop Or In CairoDock - Citing Script Path As Command - Nothing Happens

Apr 15, 2010

I recently downloaded the program cronometer (calorie counter) and I love it. It is run using a script I wrote (its a java program) that is in the directory of the program files (so the program does not appear under any of the application menus). The script functions only when it is in the destination folder. I did make the script executable. A symbolic link to the file also works but again, only when in the same folder. When I try to make a launcher on the desktop or in CairoDock, citing the script path as the command, nothing happens. I have tried it with both "bash" and "sh" prefixes on the command without success. Any ideas on how I could get this launcher to work?

View 1 Replies View Related

General :: Extract Only Number In A Path In Bash?

Mar 17, 2011

I've these path:

Code:
xxx/yyy/zzz/0908/aaa/a.txt
xxx/yyy/zzz/0909/aaa/a.txt
xxx/yyy/zzz/0910/aaa/a.txt
fff/ggg/hhh/iii/jjj/0911/aaa/a.txt
fff/ggg/hhh/kkk/0912/aaa/a.txt

and I would like to extract only the number, so that I've get the result

Code:
0908
0909
0910
0911
0911

How can I do it in bash?

View 1 Replies View Related







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