The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [mkdir]

The mkdir (make directory) command in the Unix, DOS, OS/2 and Microsoft Windows operating systems is used to make a new directory. The underlying system call is also called mkdir(). In DOS, OS/2 and Windows the command is often abbreviated to md.

Filter by
Sorted by
Tagged with
-1
votes
1answer
27 views

create multiple folders using folder/*/folder"

I've been using this line to create multiple folders in different sub-folders using a wildcard: FOR /d %A IN ("C:\users\me\desktop\test\*") do mkdir "%A\test3\" My problem now is that I have to ...
0
votes
2answers
64 views

Unable to create a directory called '!?'

I am on linux, and want to create a directory called !? in a flash drive formatted as FAT32. No matter what I try, whether it be GUI or mkdir, I cannot create a directory called !?. However, I can ...
0
votes
1answer
35 views

Creating documents does not work

Hello i am trying to generate folders and name them according to input parameters What is wrong in this script ? root=$1 clcount=$2 clstep=$3 delay=$4 dstep=$5 echo $root echo $clcount echo $...
0
votes
0answers
112 views

Windows 10 mkdir in Python Script with Special Character [duplicate]

I think/hope this a an easy question that I just can't find the answer to - how do I create a directory where the title contains a colon? I'm scraping data from a website with variables for section ...
0
votes
1answer
62 views

recursive mkdir - folder exists but user has no permissions on it

I'm trying to recursively create directories through ssh. The directory /home/user/staging exists. But the user has no permission to read /home. mkdir doesn't know if /home/user exists and tries to ...
0
votes
2answers
58 views

delete old dir, make new empty dir

The single bash command >| foo creates an empty file foo, no matter if it was previously nonempty, or empty, or missing. (It fails if it was read-only, or a directory.) Is there a similar single ...
0
votes
0answers
389 views

using mkdir in tmp folder on mac

when I use mkdir /tmp/test I get the following message mkdir: Folder: Permission denied but when I enclose the file path in double quotes it works mkdir "/tmp/test" first method works ...
2
votes
1answer
5k views

How to recursively create subfolder in each folder of a directory in CMD

Let's say I have a directory called Grandparent Inside this directory are multiple other folders, Parent 1, Parent 2, etc.. My goal is to create a new folder, Child, inside each of the Parent folders. ...
2
votes
1answer
97 views

Make and open linux directory with one commmand

Instead of doing: mkdir build cd build or: mv build build_2017_03_03 cd build_2017_03_03 What is one command that does both?
0
votes
2answers
797 views

Creating folder using php in root directory shows mkdir error in ubuntu

My issue is getting an error as following while try to create a folder using php script in /opt/lampp/htdocs/. mkdir(): permission denied Am am using ubuntu system and lampp installed. In my ...
0
votes
2answers
81 views

Create a directory with a specific group on Debian

I have set up a small FTP server for a project I'm working on. However, when "user1" create a directory, that directory user and groups are both "user1". What I'd like to get is a directory that ...
9
votes
2answers
10k views

Powershell silent mkdir

Is there a way to use mkdir (aka md) in powershell without verbose output? Currently, the output is as follows: PS C:\Users\myusername> mkdir foobar Directory: C:\Users\myusername Mode ...
10
votes
2answers
10k views

Bash File/Folder Permission Issue on Windows 10

mkdir creates folders with 777 permission by default. How can I make 755 default? Also when I clone a git repository all the files and folders are downloaded with 777 permission! How can I correct ...
0
votes
1answer
177 views

Multiple directories padded with leading zeros from a single call to mkdir in PowerShell?

How to make multiple directories with padded zeros from a single call to md (mkdir, New-Item)? From this thread, I see that I can use this command to pad regular directory names with trailing numbers: ...
11
votes
3answers
3k views

Multiple directories: Powershell equivalent of “mkdir dir{1..9}”?

What is the syntax to create multiple directories with PowerShells md (or mkdir, New-Item...) equivalent to the 'nix command mkdir ch{1..9} i.e. ~/parent_dir/ ch1/ ch2/ ch3/ ch4/ ch5/ ch6/...
0
votes
2answers
1k views

Windows cannot find “mkdir”

I was trying to create a folder from a Rainmeter skin which didn't work and didn't even yield an error message. Therefore I pasted the command (mkdir C:\Users\%USERNAME%\Foo) used in Rainmeter into ...
0
votes
1answer
52 views

Find all File to log and add string to log BASH

Find all the files in the folder, create list(log) and the log at the beginning of each Append To row "mkdir -p /VOLUME1/path Like This: /volume1/TEST/folder1/1.jpg /Volume1/TEST/folder2/2.jpg I ...
3
votes
1answer
91 views

Why can't I create a folder in c:\folder\*\folder?

So I want to create a folder inside a 2nd level of subfolders. So if I follow other example given here: FOR /d %A IN ("e:\corporate folder\*") DO mkdir "%A\2015" And change it to: FOR /d %A IN (C:\...
0
votes
1answer
1k views

copy files to other folder - find

I have to copy files to folder with name with their type using command 'find'. There are a lot of files with a lot of folders. I tried command: find ./find -type f -exec bash -c ' file -b "$1"|cut -d ...
9
votes
1answer
926 views

Force Windows use .EXE on PATH rather than CMD.EXE internal command

When I execute a command with the same name as an internal command, instead of searching in the path Windows simply uses the one found in CMD.EXE. For example, MKDIR is an internal command built into ...
1
vote
1answer
391 views

mkdir -p is “ambiguous” what should I do?

When I type in "mkdir -p" windows powershell spits out that the parameter p cannot be used because it is ambiguous, any idea what I am doing wrong? Thanks
3
votes
1answer
144 views

Need a fix for MKDIR

I've been using OmniGraffle as a drawing tool for a textbook I'm writing. Up to today I've drawn the drawing, saved it as a graffle. I then, export the same graffle drawing as a png, as per my ...
2
votes
2answers
129 views

moving directories after grep

I have isseued the next command in order to move some directories to the "build_tools" folder however the result was not the one I expected. ls -l | grep 2014-03 | awk '{if ($8!=build_tools) print $...
13
votes
5answers
5k views

How do I tell mkdir to try creating dir1, and if it already exists create dir2, etc, until it hits a name that doesn't exist?

I want to create a directory with a number at the end, e.x. "dir1", and increment that number if the directory already exists until it hits a directory name that doesn't exist, and I need to do this ...
0
votes
1answer
252 views

ASUS RT-N56U router Linux create mount point issue

On my RT-N56U router I'm trying to create a ext3 partition on an attached usb drive to store my media center data. The problem is I am unable to create to a mount point after creating the partition. ...
2
votes
1answer
87 views

How can I create several folders?

How can I create several subfolders in folder in one command. For example, I want to create: /home/user/*create dir1*/*create dir2*/*create dir3*/ Provided, I don't have dir1. And I can't use 3 ...
0
votes
1answer
373 views

file_exists() and mkdir($a, $b, true) do not work properly if my Apache runs in a VirtualBox and the DocumentRoot is a shared folder. Why?

I have a Windows7 PC with a hosted VirtualBox (Ubuntu). On the VirtualBox is an Apache2. The is shared to the Windows7 host. So if I use ls -l I see that the contents are owned by root:vboxsf. If ...
1
vote
1answer
180 views

Why isn't Interix mkdir honoring -p argument?

I'm using Interix on Windows for Unix compatibility and am finding the -p argument to mkdir not behaving as I expect: > which mkdir C:\SFU\bin\mkdir > mkdir -p c:\Program Files\ A subdirectory ...
15
votes
5answers
36k views

mkdir that overwrites any existing directory

If I try to run mkdir build to create a build directory, if the directory already exists, this error is thrown: A subdirectory or file build already exists.. I need to delete and overwrite this ...