Sponsored Content
Full Discussion: Mkdir
Top Forums UNIX for Beginners Questions & Answers Mkdir Post 302991988 by abdossamad2003a on Monday 20th of February 2017 11:04:05 AM
Old 02-20-2017
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

Moderator's Comments:
Mod Comment Please use icode or code tags next time for your code and data

Last edited by vbe; 02-20-2017 at 01:54 PM..
 

10 More Discussions You Might Find Interesting

1. Linux

install vs mkdir

I'm sitting here late at night, reading linux from scratch, and I come to this part: http://lfs.osuosl.org/lfs/view/stable/chapter06/creatingdirs.html my question to you, the all knowing unix.com'ers is this: what's the difference between using the install command as they do, and using the... (1 Reply)
Discussion started by: thmnetwork
1 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. 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

6. Shell Programming and Scripting

mkdir bug

Dear, I have the following script: maak_backup () { echo 'Maken van tijdelijke bestanden, even geduld aub.' for i in /home/yannick/* ; do cp -r $i $i.bac done if ; then echo 'Backup map = OK!' echo 'Bezig met kopiëren, even geduld... (9 Replies)
Discussion started by: yadeki
9 Replies

7. Linux

mkdir command

Hi all, i am new to Linux and need some help. I used the command: mkdir super Directory super is created When i try to change to this directory using: cd /super I get: bash: cd: /super: No such file or directory when i use: rm super I get: rm: cannot remove 'super': Is a directory What... (5 Replies)
Discussion started by: Deside
5 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 Dummies Questions & Answers

Mkdir utility

Howdy, Puttering around in unix, and read this in the mkdir man page: "The mkdir utility creates the directories named as operands..." What does this mean, i.e. as operands? Many thanks, DN (2 Replies)
Discussion started by: danuke
2 Replies

10. UNIX for Dummies Questions & Answers

How to use mkdir{...} with a variable?

Hi, I used "mkdir job{0001..10}" do get directories. Now I want to create directories with a variable, for exemple "mkdir job{0001..$a}". When a=5 I get the directory "job{0001..5}". What have i to change to get job0001,...,job0005 :/ Thx for ur help :) (1 Reply)
Discussion started by: E_taks
1 Replies
mkdir(1)						      General Commands Manual							  mkdir(1)

NAME
mkdir - Makes a directory SYNOPSIS
mkdir [-m mode] [-p] directory... STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: mkdir: XCU5.0 Refer to the standards(5) reference page for more information about industry standards and associated tags. OPTIONS
Sets the file permissions to mode, a symbolic mode string as defined for chmod, after creating the specified directory. The mode argument can be either an absolute mode string or a symbolic mode string as defined for chmod. See the chmod(1) reference page. In symbolic mode strings, the operation characters + and - are interpreted relative to an assumed initial mode of a=rwx, A + adds permissions to the default mode, whereas a - deletes permissions from the default mode. Creates intermediate directories as neces- sary; otherwise, the full path name prefix to directory must already exist. The user must have mkdir write permission in the parent directory. Each component of directory that does not name an existing directory is created with mode 777, modified by the current file mode creation mask (umask). The equivalent of chmod u+wx is performed on each component to ensure that mkdir can create lower directo- ries regardless of the setting of umask. Each component of directory that names an existing directory is ignored without error. If an intermediate path name component exists, but permissions are set to prevent writing or searching, mkdir fails and returns an error message. The mode argument does not apply to any intermediate directories created when the -p option is specified. OPERANDS
The path name of the directory to be created. DESCRIPTION
The mkdir command creates new directories with read, write, and execute permissions based upon the permissions established by the umask setting. [Tru64 UNIX] The mkdir command also creates the standard entries (dot) for the directory itself and (dot dot) for its parent. NOTES
Some of the requested directories may be created although an error occurs subsequent to the directory creation. If the directory specified by the -p option already exists, the command does not return an error status, in compliance with POSIX.2. [Tru64 UNIX] To make a new directory, you must have write permission in the parent directory. EXIT STATUS
The following exit values are returned: All requested directories were created, or the -p option was used and all of the requested directo- ries now exist. An error occurred. EXAMPLES
To create a new directory called test, enter: mkdir test To set file permissions for new directory test in absolute mode, enter: mkdir -m 444 test To set file permissions for new directory test in symbolic mode, enter: mkdir -m+rw test ENVIRONMENT VARIABLES
The following environment variables affect the execution of mkdir: Provides a default value for the internationalization variables that are unset or null. If LANG is unset or null, the corresponding value from the default locale is used. If any of the internationalization vari- ables contain an invalid setting, the utility behaves as if none of the variables had been defined. If set to a non-empty string value, overrides the values of all the other internationalization variables. Determines the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as opposed to multibyte characters in arguments). Determines the locale for the for- mat and contents of diagnostic messages written to standard error. Determines the location of message catalogues for the processing of LC_MESSAGES. SEE ALSO
Commands: chmod(1), rm(1), rmdir(1), Bourne shell sh(1b), POSIX shell sh(1p), umask(1) Functions: mkdir(2) Standards: standards(5) mkdir(1)
All times are GMT -4. The time now is 06:37 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy