Creation of directoryname with Max limit


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Creation of directoryname with Max limit
# 8  
Old 11-11-2008
Hi,

Thanks for spending time on this..

I am expecting output as below:


/tmp/filesssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss

and that length must exceed till PATHMAX=1023..

Thanks,
Mansa
# 9  
Old 11-11-2008
You are confusing PATH_MAX with max filename length, which is filesystem dependent. If you want to see what is the max file length possible on a particular filesystem, you can use:
Code:
perl -e '$fn="files" . ("s" x shift(@ARGV)); mkdir($fn) || die "Cannot create: $fn";' 200

Increase 200 until it fails. That will be the filename that's too long.
# 10  
Old 11-12-2008
Hi,

Could you please send me the same code in shell programming(sh) instead of perl..

Thanks in Advance,
Mansa
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

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. 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

7. 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

8. 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

9. 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
Login or Register to Ask a Question