Sponsored Content
Full Discussion: mkdir command
Operating Systems Linux mkdir command Post 302541411 by alister on Sunday 24th of July 2011 01:05:14 PM
Old 07-24-2011
Hello, Deside:

If the directory is empty, you can also use rmdir.

Regards and welcome to the forums,
Alister
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

What's the problem with the command of mkdir

The message is: #mkdir /home/ade mkdir:Failed to make directory "/home/ade",Operation not applicable. What's the problem? :mad: (3 Replies)
Discussion started by: new_hand
3 Replies

2. Shell Programming and Scripting

mkdir

Hi, I look for a script to create 150 directories : d000 d001 d002 ... ... d149 would you help me please ? I think it would be for i mkdir d$i Many thanks. PS : #uname -a AIX fserver 3 5 0050691A4C00 (2 Replies)
Discussion started by: big123456
2 Replies

3. UNIX for Advanced & Expert Users

mkdir

Is there ant way to increase max number of folders in the directory from the 32766: Problem UFS: shell>mkdir mmm mkdir: mmm: Too many links But there are no links, just folders. shell>ls | wc -l 32766 (3 Replies)
Discussion started by: mirusnet
3 Replies

4. Shell Programming and Scripting

Cp/Mkdir and spaces

I am having trouble using cp and mkdir commands on a small script. The problem is I have spaces what I am trying to mkdir and then copy. Any suggestions on how I can solve this problem? I've tried searching online. while read linefile do echo mkdir -p $CPP$linefile | cut -d / -f 1-5,8-12 ... (10 Replies)
Discussion started by: imagiro1
10 Replies

5. UNIX for Dummies Questions & Answers

mkdir unix command

hi.. i want to know how mkdir command make directory in linux....?? (2 Replies)
Discussion started by: rinkugarg
2 Replies

6. Shell Programming and Scripting

Help me with mkdir command

Hi, please help me with this small script #!/bin/sh curdir=`pwd` n20=$curdir'/n20/' msat=$curdir'/n20/msat/' if then mkdir $n20 fi if then mkdir $msat fi for a in 30 40 50 60 70 80 do (4 Replies)
Discussion started by: Dark2Bright
4 Replies

7. Shell Programming and Scripting

[Solved] how to create multiple directory in one mkdir command

Hi, Unix Gurus, - I have a simple question, I need create multiple directory. I use mkdir {dir1, dir2, dir3) I got one directory as {dir1, dir2, dir3} I searched @ google, I got answer as above code.:wall::confused: Anybody has any idea Thanks in advance ---------- Post updated... (3 Replies)
Discussion started by: ken002
3 Replies

8. Homework & Coursework Questions

Mkdir

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Do the procedure, which if there are 5 parameters then it creates 4 directories with names of 4 parameters, in... (2 Replies)
Discussion started by: bolones
2 Replies

9. UNIX for Beginners Questions & Answers

Mkdir

hi linux expert what is a difference between: mkdir test and mkdir ./test and also if ( -e /test ) then and if ( -e ./test ) then thanks in advance Please use icode or code tags next time for your code and data (1 Reply)
Discussion started by: abdossamad2003a
1 Replies

10. Shell Programming and Scripting

Cd then mkdir from script

Importing images from a camera (or two). I sort by date (1901 this month). Currently (failing) if ] then echo "Found Panasonic G9X" #echo "List files on camera" #ls ${pana}/* . chxdir.sh ${photos}/$mn I want to change directory to a fixed base ($photos)/$mn... (10 Replies)
Discussion started by: dpawson
10 Replies
rmdir(2)							System Calls Manual							  rmdir(2)

NAME
rmdir - Removes a directory file SYNOPSIS
#include <unistd.h> int rmdir ( const char *path ); STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: rmdir(): XSH5.0 Refer to the standards(5) reference page for more information about industry standards and associated tags. PARAMETERS
Specifies the directory pathname. The final component of the path parameter cannot be a symbolic link. DESCRIPTION
The rmdir() function removes the directory specified by the path parameter. The directory is removed only if it is an empty directory. For the rmdir() function to execute successfully, the calling process must have write access to the parent directory of the path parameter with respect to all of the system's access control policies. If the directory's link count becomes 0 (zero) and no process has the directory open, the space occupied by the directory is freed and the directory is no longer accessible. If one or more processes have the directory open when the last link is removed, the . (dot) and .. (dot-dot) entries, if present, are removed before the rmdir() function returns, and no new entries may be created in the directory. How- ever, the directory is not removed until all references to the directory have been closed. Upon successful completion, the rmdir() function marks the st_ctime and st_mtime fields of the parent directory for update. RETURN VALUES
Upon successful completion, the rmdir() function returns a value of 0 (zero). If the rmdir() function fails, a value of -1 is returned and errno is set to indicate the error. ERRORS
If the rmdir() function fails, the directory is not deleted and errno may be set to one of the following values: Search permission is denied on a component of the path parameter, or write permission is denied on the parent directory of the directory to be removed. The process does not have write access to the parent directory with respect to one of the system's access control policies. The directory is in use as either the mount point for a file system or the current directory of the process that issued the rmdir() function. The directory named by the path parameter is not empty. The path parameter is an invalid address. While reading from or writing to the file system, an I/O error occurred. Too many links were encountered in translating path. The length of the path parameter exceeds PATH_MAX, or a pathname component is longer than NAME_MAX. The directory named by the path parameter does not exist or is an empty string. A component of the path parameter is not a directory. The S_ISVTX flag is set on the parent directory of the directory to be removed, and the caller is not the file owner. The directory named by the path parameter resides on a read-only file system. [Tru64 UNIX] For NFS file access, if the rmdir() function fails, errno may also be set to one of the following values: The file position pointer associated with the filedes parameter was negative. Indicates either that the system file table is full, or that there are too many files currently open in the system. Indicates a stale NFS file handle. An opened file was deleted by the server or another client; a client cannot open a file because the server has unmounted or unexported the remote directory; or the directory that contains an opened file was either unmounted or unexported by the server. RELATED INFORMATION
Functions: chmod(2), mkdir(2), mknod(2), rename(2), umask(2), unlink(2), mkfifo(3), remove(3) Standards: standards(5) delim off rmdir(2)
All times are GMT -4. The time now is 05:55 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy