Sponsored Content
Full Discussion: Question for UNIX directory
Top Forums UNIX for Dummies Questions & Answers Question for UNIX directory Post 302856295 by ipfreak on Monday 23rd of September 2013 02:49:52 PM
Old 09-23-2013
Quote:
Originally Posted by alister
With the trailing slash, the pathname can only match a directory (there is none, therefore the diagnostic message). Without the trailing slash, the pathname is allowed to match any file type, including the existing symlink.

Regards,
Alister

---------- Post updated at 01:55 PM ---------- Previous update was at 01:28 PM ----------

POSIX Pathname Resolution (section 4.11):



Regards,
Alister

thanks!
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

moving files from a unix directory to a windows directory

Any body any ideas i'm failry new to this so any help would be appreciated. Cheers Steve (2 Replies)
Discussion started by: gleads
2 Replies

2. UNIX for Dummies Questions & Answers

Unix History Question: Why are filenames/dirnames case sentsitive in Unix?

I tried looking for the answer online and came up with only a few semi-answers as to why file and directory names are case sensitive in Unix. Right off the bat, I'll say this doesn't bother me. But I run into tons of Windows and OpenVMS admins in my day job who go batty when they have to deal... (3 Replies)
Discussion started by: deckard
3 Replies

3. Shell Programming and Scripting

FTP script for sending a file from one unix directory to another unix server director

Hi, My local server is :/usr/abcd/ Remote server is :/Usr/host/test/ I want to send files from local unix directory(All files starting with O_999) to remote host unix directory. Can any body give me the Unix Shell script to do this. One more doubt: Shall we need to change the file... (1 Reply)
Discussion started by: raja_1234
1 Replies

4. UNIX for Dummies Questions & Answers

home directory & group in UNIX question

folks; I'm going to use LDAP on Solaris 10 to authenticate users, i have 3 questions, i'm hoping it can be possible: 1. when users login for the first time, Is there a way to auto create a home directory like "/home/"user_name" so we don't have to a create a home directory for every single... (3 Replies)
Discussion started by: Katkota
3 Replies

5. Shell Programming and Scripting

Move a file from windows directory to unix directory

Move a file from windows directory to unix directory, is this possible? if it is, can someone help me on this? Thanks! God bless! (1 Reply)
Discussion started by: kingpeejay
1 Replies

6. Shell Programming and Scripting

File transfer from one directory to another directory in unix

Hi, I have to transfer five files from one directory to another directory in unix with the help of shell scripts. This shell script calling the param file as input parameter. Every day one file will come and fall on my source directory. Remaining files will fall on any one of the day of the... (5 Replies)
Discussion started by: easterraj
5 Replies

7. UNIX for Dummies Questions & Answers

Unix directory system calls question

I'm currently studying for my exam, and is practicing with sample exam questions. However there is a question asking "Name THREE UNIX Directory system calls" and the answer given is "opendir, closedir and readdir", however the next question ask "Why is a write directory system call not included... (1 Reply)
Discussion started by: Izzy123
1 Replies

8. Shell Programming and Scripting

Checking directory permissions on UNIX directory

Hi, How do i check if I have read/write/execute rights on a UNIX directory? What I'm doing is checking read access on the files but i also want to check if user has rights on the direcory in whcih these files are present. if then...... And I check if the directory exists by using... (6 Replies)
Discussion started by: chetancrsp18
6 Replies

9. Solaris

Question about directory structure

I have a Solaris 9 system and was trying to familiarize myself with how the filesystem is laid out. I was wondering what the following directories were for (legacy, some administrative reason, etc) The reason I ask about these specific directories is that they have executables with the... (4 Replies)
Discussion started by: thmnetwork
4 Replies

10. UNIX for Dummies Questions & Answers

Extract directory name from the full directory path in UNIX using shell scripting

My input is as below : /splunk/scrubbed/rebate/IFIND.REBTE.WROC.txt /splunk/scrubbed/rebate/IFIND.REBTE.WROC.txt /splunk/scrubbed/loyal/IFIND.HELLO.WROC.txt /splunk/scrubbed/triumph/ifind.triumph.txt From the above input I want to extract the file names only . Basically I want to... (5 Replies)
Discussion started by: IshuGupta
5 Replies
ckpath(1)							   User Commands							 ckpath(1)

NAME
ckpath, errpath, helppath, valpath - display a prompt; verify and return a pathname SYNOPSIS
ckpath [-Q] [-W width] [-a | l] [-b | c | f | y] [-n [o | z] ] [-rtwx] [-d default] [-h help] [-e error] [-p prompt] [ -k pid [-s sig- nal]] /usr/sadm/bin/errpath [-W width] [-a | l] [-b | c | f | y] [-n [o | z] ] [-rtwx] [-e error] /usr/sadm/bin/helppath [-W width] [-a | l] [-b | c | f | y] [-n [o | z] ] [-rtwx] [-h help] /usr/sadm/bin/valpath [-a | l] [-b | c | f | y] [-n [o | z] ] [-rtwx] input DESCRIPTION
The ckpath utility prompts a user and validates the response. It defines, among other things, a prompt message whose response should be a pathname, text for help and error messages, and a default value (which is returned if the user responds with a <RETURN>). The pathname must obey the criteria specified by the first group of options. If no criteria is defined, the pathname must be for a normal file that does not yet exist. If neither -a (absolute) or -l (relative) is given, then either is assumed to be valid. All messages are limited in length to 79 characters and are formatted automatically. Tabs and newlines are removed after a single white space character in a message definition, but spaces are not removed. When a tilde is placed at the beginning or end of a message defini- tion, the default text is inserted at that point, allowing both custom text and the default text to be displayed. If the prompt, help or error message is not defined, the default message (as defined under EXAMPLES) is displayed. Three visual tool modules are linked to the ckpath command. They are errpath (which formats and displays an error message on the standard output), helppath (which formats and displays a help message on the standard output), and valpath (which validates a response). These mod- ules should be used in conjunction with Framed Access Command Environment (FACE) objects. In this instance, the FACE object defines the prompt. OPTIONS
The following options are supported: -a Pathname must be an absolute path. -b Pathname must be a block special file. -c Pathname must be a character special file. -d default Defines the default value as default. The default is not validated and so does not have to meet any criteria. -e error Defines the error message as error. -f Pathname must be a regular file. -h help Defines the help message as help. -k pid Specifies that process ID pid is to be sent a signal if the user chooses to quit. -l Pathname must be a relative path. -n Pathname must not exist (must be new). -o Pathname must exist (must be old). -p prompt Defines the prompt message as prompt. -Q Specifies that quit is not allowed as a valid response. -r Pathname must be readable. -s signal Specifies that the process ID pid defined with the -k option is to be sent signal signal when quit is chosen. If no signal is specified, SIGTERM is used. -t Pathname must be creatable (touchable). Pathname will be created if it does not already exist. -w Pathname must be writable. -W width Specify that prompt, help and error messages be formatted to a line length of width. -x Pathname must be executable. -y Pathname must be a directory. -z Pathname must have a file having a size greater than zero bytes. OPERANDS
The following operand is supported: input Input to be verified against validation options. EXAMPLES
The text of the default messages for ckpath depends upon the criteria options that have been used. Example 1: Default prompt An example default prompt for ckpath (using the -a option) is: example% ckpath -a Enter an absolute pathname [?,q] Example 2: Default error message An example default error message (using the -a option) is: example% /usr/sadm/bin/errpath -a ERROR: A pathname is a filename, optionally preceded by parent directories. The pathname you enter: - must begin with a slash (/) Example 3: Default help message An example default help message (using the -a option) is: example% /usr/sadm/bin/helppath -a A pathname is a filename, optionally preceded by parent directories. The pathname you enter: - must begin with a slash (/) Example 4: The quit option When the quit option is chosen (and allowed), q is returned along with the return code 3. Quit input gets a trailing newline. Example 5: Using the valpath module The valpath module will produce a usage message on stderr. It returns 0 for success and non-zero for failure. example% /usr/sadm/bin/valpath usage: valpath [-[a|l][b|c|f|y][n|[o|z]]rtwx] input . . . EXIT STATUS
The following exit values are returned: 0 Successful execution. 1 EOF on input, or negative width on -W option, or usage error. 2 Mutually exclusive options. 3 User termination (quit). 4 Mutually exclusive options. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
face(1), signal.h(3HEAD), attributes(5) SunOS 5.10 14 Sep 1992 ckpath(1)
All times are GMT -4. The time now is 03:54 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy