problem with directory


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers problem with directory
# 1  
Old 12-12-2006
Question problem with directory

Smilie Smilie hi gurus,
I have created a directory called "Proj" in the root directory.
I then created a file called "dboper.prg" in that directory.
I have given file permissions and directory permissions .

But when executing the file dboper.prg ($ dboper.prg) from being in the proj directory,i am getting the error "command not found".

When i specify the complete path of the file then only its getting executed.
(like $ /proj/dboper.prg).

Why do i need to specify the complete path instead of just the file name to execute that file?

any help pls



cheers RRK
# 2  
Old 12-12-2006
You have include your directory in PATH variable to execute the shell scripts

Code:
PATH=$PATH":."

# 3  
Old 12-12-2006
Or
Code:
$ export PATH=/proj:$PATH
$ ./dboper.prg

Make sure dboper.prg has execute permissions.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Problem with if statement, cannot get to right directory

I have several scripts , which are calling one. That script, depends of arguments, processing daily, weekly and monthly files. After process daily, I started process weekly exec ${LOCL_WORKING_DIR}/sftp_ondemand.sh /export/data/mbsesb/config/ondemand.cfg /export/data/mbsesb/config/filename.lst... (11 Replies)
Discussion started by: digioleg54
11 Replies

2. Shell Programming and Scripting

Naming of directory problem

hi all suppose in particular directory i have lots of directory supoose 201009 201010 201011 201012 now by mistake i have rename all these directory as 201009.bk 201010.bk 201011.bk 201012.bk now how can i revert the changes back pls help me regarding this (2 Replies)
Discussion started by: aishsimplesweet
2 Replies

3. UNIX for Dummies Questions & Answers

Problem with Restricting Directory in Apache

Hello, I want to restrict access to our Subversion repositories to only our internal network. I have a virtual host directive setup in Apache for the IP and port 443. When I put the following: <Directory "/var/www/svn/"> Order allow,deny AllowOverride None Allow from 10.5.10.0/24 Allow... (1 Reply)
Discussion started by: mojoman
1 Replies

4. UNIX for Dummies Questions & Answers

Problem with spaces in directory path

Hi Gurus, I have a requirement. cat /usdd/Sample/"NDDF Plus DB"/"NDDF Descriptive and Pricing"/"NDDF BASICS 3.0"/"Pricing"/1.txt | sed 's/*|*/|/g' | sed 's/^*//'| sed 's/^*//; s/*$//' > temp.txt In unix prompt the above command is reading the file 1.txt and I am... (1 Reply)
Discussion started by: prabhutkl
1 Replies

5. Linux

Problem about Fedora directory permission

Problem about Fedora directory permission,can anyone help me? In fedora,I have two ordinary user named user1&user2 in different groups,when I logined user1 and created a dir named test/ in '/home/ user1/',and do 'chmod 750 test',so when 'ls -l',it appears 'drwxr- x---' for 'test',but when I... (3 Replies)
Discussion started by: zhouq3132
3 Replies

6. Shell Programming and Scripting

Directory Creation problem

Hiiii, here is my script-- BackupLocation="$OPTARG" if ]; then echo "Either option l or L should be given to $Programname" echo "$Usage" echo "$Programname is terminated" ... (1 Reply)
Discussion started by: namishtiwari
1 Replies

7. Shell Programming and Scripting

Directory inside directory problem

hii, I have to create a directory under the same directory with the date +%a extension like this BackupLocation=$BackupLocation/$BackupLocation$(date +%w) but the problem is --- if backuplocation is abc/dfg then accroding to the above statement it would be abc/dfg/abc/dfg5 but i... (6 Replies)
Discussion started by: namishtiwari
6 Replies

8. UNIX Desktop Questions & Answers

Problem Removing a Directory !!!

Hi All, When i remove a directory , the following error message comes : rm: cannot determine if this is an ancestor of the current working directory Is it something to do with the permissisons ? The path is /PBAMLftp/incoming/misc/July06 - (where i need to remove the July06 directory) And... (1 Reply)
Discussion started by: gauravsachan
1 Replies

9. Shell Programming and Scripting

problem with directory commands

Hello... I am having a slight problem when I run the basic directory command from a shell script... i used the foll code:: $ cat a pwd date cd .. all the command of the script except the " cd .. " command are working...I also tried cd <dir_path> through diff means...including giving... (1 Reply)
Discussion started by: tej.buch
1 Replies

10. Solaris

home directory problem

I have solaris 9 installed across 2 disks. disk 1 / s0 swap s1 /usr s6 /var s3 /home s7 disk2 /swapfile (spare space for use with swap) s1 /opt s5 /export/home s7 When I create a new user using solaris Management... (1 Reply)
Discussion started by: finster
1 Replies
Login or Register to Ask a Question