06-29-2005
Hi vino,
Thanks heaps I tried your advise, but I keep getting -bash: ../stpth: No such file or directory.
it will only run when I use stpth without any path indications.
I am using Linux/bash.
I see what you mean about the seperate shell, not the original shell having the directory changed.
I will keep trying for an answer.
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi, I am pretty new to the Solaris world. Just installed the version 8 and found that the time is off. I am in the Central time zone. In the beginning, the date and time was off by a day. After changing the /etc/default/init, there is no avail. The date is now correct but the time is still 5 hours... (7 Replies)
Discussion started by: conflansun
7 Replies
2. Shell Programming and Scripting
i am new to perl. i am writing a perl script. i want to know how to change the working directories? for ex. i have a perl script in c:\proj\ . i want to run this script in this directory but i need my script to change its working directory to D:\xyz\ dynamically in the script.
your help is... (1 Reply)
Discussion started by: megastar
1 Replies
3. UNIX for Dummies Questions & Answers
How to change current working directory for dbx on UNIX?
means I'll run pgm from one directory , but getcwd() should return path which I want to be, which is not d current dir
:) (5 Replies)
Discussion started by: login0001
5 Replies
4. UNIX for Advanced & Expert Users
The file /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_frequency reads a value of 800 Mhz . The powertop tool also suggested that 800 Mhz w3as the minimum frequency being used . I changed the above-mentioned file to 1.6 GHz and monitored powertop tool again . To my surprise, it still said that... (3 Replies)
Discussion started by: vishwamitra
3 Replies
5. Linux
I was doing timezone and DST testing which is required for some of my products
Here is the strange behaviour i observed
First i did set the timezone to PST 2010 (which is less than GMT basically negative timezone)
zdump -v /etc/localtime |grep 2010
/etc/localtime Sun Mar 14 09:59:59... (0 Replies)
Discussion started by: ravindra1103
0 Replies
6. Shell Programming and Scripting
Hi everyone,
I have an Linux FTP script to get files from different AS400 mailboxes and store in different local directories.
I had to use mget * option becuase there is no fixed destination file name means filename can change.
The following FTP script is working fine if we have single file... (5 Replies)
Discussion started by: oravikiran
5 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I Installed mysql on my CentOS 6.2 Server. But when I tried to change the location of /var/lib/mysql to another directory. I can't start the mysql. Below is what I've done
yum install mysql mysql-server mysql-devel
mkdir /path/to/new/
cp -R /var/lib/mysql /path/to/new
chown -R... (1 Reply)
Discussion started by: ganitolngyundre
1 Replies
8. Shell Programming and Scripting
I am trying to do the following task :
export ENV=aaa
export ENV_PATH=$(cd /apps | ls | grep $ENV)
However, it's not working. What's the way to change to directory and search some file in that directory in single command
Please help. (2 Replies)
Discussion started by: saurau
2 Replies
9. UNIX for Beginners Questions & Answers
I have file 2.txt and I want to change the delimiter form , to :
Not sure what is the problem with below command
cat 2.txt
1,a
2,b
3,d
awk 'BEGIN {FS=",";OFS=":";} {print $0}' 2.txt
Please use CODE tags as required by forum rules! (11 Replies)
Discussion started by: vamsi.valiveti
11 Replies
chdir(2) System Calls Manual chdir(2)
NAME
chdir, fchdir - change working directory
SYNOPSIS
DESCRIPTION
and cause a directory pointed to by path or fildes to become the current working directory, the starting point for path searches of path
names not beginning with path points to the path name of a directory. fildes is an open file descriptor of a directory.
For a directory to become the current working directory, a process must have execute (search) access to the directory.
RETURN VALUE
Upon successful completion, a value of 0 is returned. Otherwise, a value of -1 is returned and is set to indicate the error.
ERRORS
fails and the current working directory remains unchanged if one or more of the following are true:
A component of the path name is not a directory.
The named directory does not exist.
Search permission is denied for any component of the path name.
path points outside the allocated address space of the process. The reliable detection of this error is implemen-
tation dependent.
path is null.
The length of the specified path name exceeds
bytes, or the length of a component of the path name exceeds bytes while is in effect.
Too many symbolic links were encountered in translating the path name.
fails and the current working directory remains unchanged if one or more of the following are true:
Search permission is denied for
fildes.
fildes is not an open file descriptor.
The open file descriptor
fildes does not refer to a directory.
AUTHOR
and were developed by AT&T Bell Laboratories and HP.
SEE ALSO
cd(1), chroot(2), privileges(5).
STANDARDS CONFORMANCE
chdir(2)