Hi,
I have a file with about 60 lines of path:
app-defaults/boxXYZ.......
I want to change this to /my/path/goes/here/app-defaults/boxXYZ, but of course vi doesn't like the regualr :s/old/new/ command.
Is there any other quick way to do this?
Thanks ;) (2 Replies)
hi experts(novice people can stay away as it is no child's game),
i am developing a script which works like recycle bin of windows.
the problem i am facing is that when ever i am trying to delete a file which is situated in parent directory or parent's parent directory i am unable to capture... (1 Reply)
hi experts(novice people can stay away as it is no child's game),
i am developing a script which works like recycle bin of windows.
the problem i am facing is that when ever i am trying to delete a file which is situated in parent directory or parent's parent directory i am unable to capture... (5 Replies)
I know this is very newbie ... but I need help determining the proper file path to file...Have no idea how to do this
I'm on a Mac OS X 10.6 Snow Leopard
thanks very much (4 Replies)
Hi,
I have a file abcd.txt which has contents in the form of full path file names i.e.
$home> vi abcd.txt
/a/b/c/r1.txt
/q/w/e/r2.txt
/z/x/c/r3.txt
Now I want to retrieve only the directory path name for each row
i.e
/a/b/c/
/q/w/e/
How to get the same through shell script?... (7 Replies)
Hi i'm new to shell script,
i want to get the filename from specific location which i mentioned in my script.
The scirpt should read the filename exactly using the following command "ls -ltr | tail -1".
Could someone show me on this. Below is my script
#!/bin/ksh
PATH= /usr/
if
then
... (4 Replies)
There's a Unix configuration file that needs to be executed at the start of my script
The location of the file is
/Dstage/AA_INTERFACES/SYSTEM_FILES/MISC/
Now the script has to be deployed into a new UAT server for testing
where the location above has been change to... (3 Replies)
Hello,
I am creating a file with all the source folders included in my git branch, when i grep for the used source, i found source included as relative path instead of absolute path, how can convert relative path to absolute path without changing directory to that folder and using readlink -f ? ... (4 Replies)
Discussion started by: Sekhar419
4 Replies
LEARN ABOUT ULTRIX
chdir
chdir(2) System Calls Manual chdir(2)Name
chdir - change working directory
Syntax
chdir(path)
char *path;
Description
The path is the pathname of a directory. The system call causes this directory to become the current working directory, which is the
starting point for pathnames that do not begin at the root directory (/).
For a directory to become the current directory, the process must have execute (search) access to the directory.
Return Values
Upon successful completion, a value of 0 is returned. Otherwise, a value of -1 is returned and errno is set to indicate the error.
Environment
Differs from the System V definition in that ELOOP is a possible error condition.
Diagnostics
The system call fails and the current working directory is unchanged under the following conditions:
[ENOTDIR] A component of the pathname is not a directory.
[ENAMETOOLONG] A component of a pathname exceeds 255 characters, or an entire path name exceeds 1023 characters.
[ENOENT] The named directory does not exist or the path points to an empty string and the environment defined is POSIX or SYS-
TEM_FIVE.
[EACCES] Search permission is denied for any component of the path name.
[EFAULT] The path points outside the process's allocated address space.
[ELOOP] Too many symbolic links were encountered in translating the pathname.
[EIO] An I/O error occurred while reading from or writing to the file system.
[ESTALE] The file handle given in the argument was invalid. The file referred to by that file handle no longer exists or has been
revoked.
[ETIMEDOUT] A connect request or remote file operation failed because the connected party did not properly respond after a period of
time that is dependent on the communications protocol.
See Alsochroot(2)chdir(2)