Sponsored Content
Top Forums UNIX for Beginners Questions & Answers A file or directory in the path does not exist Post 302990505 by rbatte1 on Friday 27th of January 2017 10:35:11 AM
Old 01-27-2017
Quote:
Code:
Code:

grep PS8 /etc/qconfig


>shows

Code:

PS8:

>shows

Code:
PS8:

I am forgetting myself. Can you try this instead to get the paragraph about PS8?:-
Code:
grep -p PS8: /etc/qconfig


Sorry about that,
Robin
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to check if directory/file exist using c/c++

Hi there,, how to check if directory/file exist using c/c++ under unix/linux? I can use access() under Window MFC. Thanks. Steven (1 Reply)
Discussion started by: steven88
1 Replies

2. Programming

how to check if directory/file exist using c/c++

Hi there, how to check if directory/file exist using c/c++ under linux/unix. Thanks. Steven (2 Replies)
Discussion started by: steven88
2 Replies

3. AIX

AIX cp error: "A file or directory in the path does not exist"

Hello fellow UNIX fans, I'm running AIX 4.3 and getting an error message “cp: /a/file2.db: A file or directory in the path does not exist” when I run the following command: cp /b/file.db /a/file2.db It stops every time about 95% of the way through the copy process at 1,073,741,312 bits. ... (3 Replies)
Discussion started by: Jackson123
3 Replies

4. UNIX for Dummies Questions & Answers

How to find if file exist in directory using *

Hi, I know how to use the test command ( ...) to find a single given name file. However, I have a case in which I have a directory with one file and one sub-directory. I know that the file starts with "fub". The command doesn't work if i call the file "fub*" as it doesn't understand I meant a... (2 Replies)
Discussion started by: buj
2 Replies

5. Shell Programming and Scripting

Retrieve directory path from full file path through sh

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)
Discussion started by: royzlife
7 Replies

6. Shell Programming and Scripting

how to check file exist in a directory or not

HI folks, can any one tell me how to check whether the file is existed in a directory or not . let me tell you my requirement : if the file is existed i should display a one message or else i have to send a mail .. i have the mail logic .. but I'm failed to check file existence .. please... (5 Replies)
Discussion started by: sravan008
5 Replies

7. Linux

Create a dummy file even if the path is not exist

hi, i want to create a dummy file even if the path to that file is not exist as follows. suppose, in my working directory 2 files are there. and i create one more file which is exist as follows # pwd /home/satya # ls file1.txt file2.txt # echo dummy > /home/satya/file3.txt # ls... (3 Replies)
Discussion started by: snreddy_gopu
3 Replies

8. Shell Programming and Scripting

find + move if destination path does not exist

hi frnds, please help ... what will happen with below command if destination path does not exist on the system.... find /var/adm/cft* -mtime +1 -exec mv {} /global/ \ in unix its remove all my files from the system from soruce file ... how is it possbile (1 Reply)
Discussion started by: dodasajan
1 Replies

9. Shell Programming and Scripting

Find if a directory exist from a list of the path

Hello, i want to script on sh to check from a path if the directory exist and isn't empty. I explain: path is : /aaa/bbb/ccc/ccc_name/ddd/ Where the cccc_name is in a list, so i think it's $1 My command find -name /aaa/bbb/ccc/$1/ddd/ didn't work because my $1 is the same and not... (5 Replies)
Discussion started by: steiner
5 Replies

10. UNIX for Beginners Questions & Answers

Convert Relative path to Absolute path, without changing directory to the file location.

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
CHDIR(2)							System Calls Manual							  CHDIR(2)

NAME
chdir, fchdir - change current working directory SYNOPSIS
chdir(path) char *path; fchdir(fd) int fd; DESCRIPTION
The path argument points to the pathname of a directory. The fd argument is a file descriptor which references a directory. The chdir function causes this directory to become the current working directory, the starting point for path names not beginning with ``/''. The fchdir function causes the directory referenced by fd to become the current working directory, the starting point for path searches of pathnames not beginning with a slahs, '/'. In order for a directory to become the current 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 errno is set to indicate the error. ERRORS
Chdir will fail and the current working directory will be unchanged if one or more of the following are true: [ENOTDIR] A component of the path prefix is not a directory. [EINVAL] The pathname contains a character with the high-order bit set. [ENAMETOOLONG] A component of a pathname exceeded 63 characters, or an entire path name exceeded 255 characters. [ENOENT] The named directory does not exist. [ELOOP] Too many symbolic links were encountered in translating the pathname. [EACCES] Search permission is denied for any component of the path name. [EFAULT] Path points outside the process's allocated address space. [EIO] An I/O error occurred while reading from or writing to the file system. Fchdir will fail and the current working directory will be unchanged if one or more of the following are true: [EACCES] Search permission is denied for the directory referenced by the file descriptor. [ENOTDIR] The file descriptor fd does not reference a directory. [EBADF] The argument fd is not a valid file descriptor. SEE ALSO
chroot(2) 4th Berkeley Distribution April 21, 1994 CHDIR(2)
All times are GMT -4. The time now is 12:23 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy