Sponsored Content
Top Forums Shell Programming and Scripting Creation of directoryname with Max limit Post 302256966 by mansa on Tuesday 11th of November 2008 01:49:51 AM
Old 11-11-2008
Creation of directoryname with Max limit

Hi,

Please provide your inputs..


# define PATH_MAX 1023 /* max number of characters in a pathname (not including terminating null) */


Could you please let me know how to create directory name(or pathname) with above PATH_MAX length in korn shell scripting..

Thanks in Advance,
Mansa
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

max value

Hi All, I want to choose the maximum value from a column values. eg - 234 23 567 43 2456 5 678 8978 from thses values how to choose the max value ? thanks. roger. (3 Replies)
Discussion started by: Nayanajith
3 Replies

2. Shell Programming and Scripting

Max NO of parameters

1> Can anyone tell me what is the maximum no of parameters that can be passed to a file 2> i have 100 files amongst which in 500 files i have a string which needs to be searched how would get the names of those files. (1 Reply)
Discussion started by: Shivdatta
1 Replies

3. Shell Programming and Scripting

TCL Socket max Limit settting

How to set the max limit for socket opening TCL Thanks, Ajay (1 Reply)
Discussion started by: aju_kup
1 Replies

4. Programming

How to limit max no of message in a posix message queue

Hii can anyone pls tell how to limit the max no of message in a posix message queue. I have made changes in proc/sys/fs/mqueue/msg_max But still whenever i try to read the value of max. message in the queue using attr.mq_curmsgs (where struct mq_attr attr) its giving the default value as 10.... (0 Replies)
Discussion started by: mohit3884
0 Replies

5. Linux

file-max limit

Oct 31 00:00:02 FIREWALL003 syslogd 1.4.1: restart. Oct 31 00:00:02 FIREWALL003 syslogd 1.4.1: restart. Oct 31 00:00:02 FIREWALL003 syslogd 1.4.1: restart. Oct 31 02:37:09 FIREWALL003 kernel: srmLINUX: segfault at 00000000303a3031 rip 000000000026fe54 rsp 00000000ffbd05b8 error 4 Oct 31... (5 Replies)
Discussion started by: itik
5 Replies

6. Shell Programming and Scripting

cutting unix path after known directoryname

Hi scripters, I know sed can do this, but I'm not to well trained to achieve this. Problem: wherever I am in my filesystem, with a 'pwd' I can check where I am. It may be "/usr/local/apache/etc/conf" or "/opt/apache/var/log/backup" or "/var/log/backup/apache/2009/december" Now from these... (7 Replies)
Discussion started by: Qube
7 Replies

7. HP-UX

max limit in in setting array

hi, iam getting error when i assign a variable to an array of more that 315 character in length set -A array <variable> <variable> value is 000001 000002 and up to 000045 it is giving error as "The specified subscript cannot be greater than 1024." can any one help me to solve this (2 Replies)
Discussion started by: gomathi
2 Replies

8. Solaris

Limit: stacksize: Can't remove limit

Hi all, I'm using to Solaris machine. When I run a simple script this messenger come out:"limit: stacksize: Can't remove limit". Any one know the way to resolve this problem without reboot the machine? Thanks in advance. (3 Replies)
Discussion started by: Diabolist9
3 Replies

9. Ubuntu

Max Open File Limit

Ubuntu users, I am configuring an Ubuntu 14.04 server as a load injector. I have appended the hard and soft limits to /etc/security/limits.conf for any user (apart from root): * hard nofile 65536 * soft nofile 65536 I am seeing the figure 65536 in... (5 Replies)
Discussion started by: aidylewis
5 Replies
getcwd(3C)																getcwd(3C)

NAME
getcwd() - get pathname of current working directory SYNOPSIS
DESCRIPTION
The function places the absolute pathname of the current working directory in the array pointed to by buf, and returns buf. The value of size must be at least one greater than the length of the pathname to be returned. If buf is a NULL pointer, obtains size bytes of space using (see malloc(3C)). In this case, the pointer returned by can be used as the argument in a subsequent call to (see malloc(3C)). Invoking with buf as a null pointer is not recommended because this functionality may be removed from the HP-UX operating system in a future release. RETURN VALUE
Upon successful completion, returns a pointer to the current directory pathname. Otherwise, it returns NULL with set if size is not large enough, or if an error occurs in a lower-level function. ERRORS
fails if any of the following conditions are encountered: The size argument is zero. The size argument is greater than zero, but is smaller than the length of the pathname. The length of the specified pathname exceeds bytes, or the length of a component of the pathname exceeds bytes while is in effect. may fail if any of the following conditions are encountered: Read or search permission is denied for a component of pathname. buf points outside the allocated address space of the process. may not always detect this error. failed to provide size bytes of memory. EXAMPLES
#include <unistd.h> #include <limits.h> char *cwd; char buf[PATH_MAX+1]; ... if ((cwd = getcwd(buf, PATH_MAX+1)) == NULL) { perror("pwd"); exit(1); } puts(cwd); AUTHOR
was developed by AT&T. SEE ALSO
pwd(1), malloc(3C), thread_safety(5). STANDARDS CONFORMANCE
getcwd(3C)
All times are GMT -4. The time now is 02:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy