mkdir: A file or path name is too long


 
Thread Tools Search this Thread
Operating Systems AIX mkdir: A file or path name is too long
# 1  
Old 08-10-2006
mkdir: A file or path name is too long

Hi,

I have an AIX machine. I am trying to create a directory from within the script, but the message being shown is "mkdir: 0653-358 Cannot create directory 'xxx': A file or path name is too long"

I am not giving any 'long' pathname to mkdir. The commands being issued within the script are:

cd /abc/def/egh
mkdir ijk

mkdir is failing to create 'ijk' because 'A file or path name is too long'

Any ideas why this is happening? Any help will be greatly appreciated.

- Greenhorn
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Switching between directories and mkdir/copy dir/file

I was trying to copy the files inside the path /home/user/check/Q1/dir/folder1/expected/n/a1.out1 and a1.out2 and a1.out3 to /home/user/check/Q2/dir/folder1/expected/n/ if n directory is not present at Q2/dir/folder1/expected/ then directory should be created first. And, script follow the... (5 Replies)
Discussion started by: Mannu2525
5 Replies

2. Shell Programming and Scripting

Use script to mkdir based on file's data

I have a file with lines like: 111 12 7 111 13 8 112 12 9 115 31 3 120 31 9 123 10 7 125 12 I want to make a script which, split the first column into parts (101-110, 111-120...), and make directories for its part with name (101-110, 111-120...) Also i want in every directory include... (7 Replies)
Discussion started by: efsarantis
7 Replies

3. Shell Programming and Scripting

How to create a long list of directories with mkdir?

Hi... Thanks to read this... I want to use mkdir to create many directories listed in a text file, let's say. How do I do this? Sorry for this maybe very basic question :) (13 Replies)
Discussion started by: setub
13 Replies

4. Shell Programming and Scripting

Copy of "How to create a long list of directories with mkdir?"

To bakunin and corona688: My result when text in file is ms_ww_546 ms_rrL_99999 ms_nnn_67_756675 is https://www.unix.com/C:\Users\Fejoz\Desktop\ttt.jpg I hope you can see the picture. There is like a "whitespace character" after 2 of the 3 created directories. ---------- Post... (0 Replies)
Discussion started by: setub
0 Replies

5. Shell Programming and Scripting

Long PATH, LD_LIBRARY_PATH, LIBPATH, … – what kind of performance impact do they have?

Hi, there! a long PATH... makes the OS access the disk quite often, hence there is a lot of disk I/O a long PATH... makes the OS compute a lot of ..., hence a high CPU load (Edited/added later: Yes, this is not about the lenght of the env. var., but about the number of directories listed.)... (1 Reply)
Discussion started by: Jochen_Hayek
1 Replies

6. Shell Programming and Scripting

0403-035 specified path name too long

I get this error when attempting to run a simple .ksh script. This script runs fine on other servers. What causes this error? (3 Replies)
Discussion started by: ivanachukapawn
3 Replies

7. Shell Programming and Scripting

specified path name is too long passing parameters to awk via shell script

Hello, I have this shell script that runs awk code by passing in parameters however now it doesn't work anymore with the parameters and I don't know why. It removes duplicates from an input file based on a part of the last field and a key column. It removes the record with the older datetime... (0 Replies)
Discussion started by: script_op2a
0 Replies

8. Windows & DOS: Issues & Discussions

Long UNC path not working in CMD.EXE on remote machine

Hi, I am trying to connect to a remote server using Plink tool. Both my local and remote machines are Windows. On remote server, I have OpenSSH server installed. I am able to run commands on remote machine but there is some problem with long UNC path, which I noticed today. For... (3 Replies)
Discussion started by: Technext
3 Replies

9. Programming

lstat long path problem

Hi, We are using lstat in our project. But in case of the path length more than 1024, it's returning error ENAMETOOLONG. Is there any another system call which is supporting more than 1024 path and providing the same info as lstat. Thanks (2 Replies)
Discussion started by: Saurabh78
2 Replies
Login or Register to Ask a Question
mkpath_np(3)						   BSD Library Functions Manual 					      mkpath_np(3)

NAME
mkpath_np -- Auxiliary routine for efficiently creating paths SYNOPSIS
#include <unistd.h> int mkpath_np(const char * path, mode_t omode); DESCRIPTION
This routine allows the caller to create a path, including intermediate directories. It is equivalent to calling mkdir(1) with the -p com- mand line argument. Intermediate directories are created with permission bits of rwxrwxrwx (0777) as modified by the current umask, plus write and search permis- sion for the owner. The leaf directory is created with permission bits of omode as modified by the current umask. RETURN VALUES
A 0 return value indicates success. If an error occurs, the return value is a non-zero error code. Note that EEXIST is returned iff the leaf directory already exists and is a directory, so under certain circumstances, this error value may not indicate a failure state. This routine does NOT modify errno. ERRORS
Any error code that can be returned by mkdir(2) can be returned by mkpath_np(), but mkpath_np() will return the error code rather than set- ting errno. [ENOTDIR] A component of the path is not a directory (in contrast to mkdir(2) which returns this based on the path prefix rather than the path). [EEXIST] The path already exists and is a directory. HISTORY
This function first appeared in iOS 5.0. SEE ALSO
mkdir(1), chmod(2), mkdir(2) Mac OS X July 13, 2011 Mac OS X