Questions tagged [mkdir]

Use this tag for questions about the bash coreutils mkdir command.

Filter by
Sorted by
Tagged with
0 votes
0 answers
35 views

"mkdir: cannot create directory ‘/vinay’: Permission denied" when i launch terminal

As fas as I understand I have tried to create a directory called vinay in root(/) while I was holding permissions only for my profile (/home/vinay) and I ran into this error a while ago. I switched ...
user avatar
  • 1
-1 votes
0 answers
44 views

How do I make folders in a read only directory?

Reviewing this page: https://bugzilla.mozilla.org/show_bug.cgi?id=1780955#c6 it asks me to link a file to the snap/firefox directory to resolve an issue. Really straight forward right? They're command ...
user avatar
1 vote
1 answer
107 views

retroarch Error while read-only file system

I installed a snap of retroarch. When i run,it show below error in image fazil@acer:~$ retroarch mkdir: cannot create directory ‘/home/fazil/snap/retroarch’: Read-only file system retroarch error ...
user avatar
0 votes
0 answers
31 views

how to create multiple subfolders in pyhton using subprocess?

On my ubuntu 20.04 when I use mkdir -p /home/parent/{child1,child2} in my terminal I get a folder parent with 2 subfolders child1 and child2. parent parent/child1 parent/child2 However, when I try ...
user avatar
  • 33
0 votes
1 answer
133 views

mkdir while true loop stops at 406 folders

Can anyone explain why my script stops making folders at 406 folders and tell me a way to get it working? #!/bin/bash rm -rf infinite2 while true do mkdir infinite2 cd ./infinite2 mkdir infinite1 ...
user avatar
1 vote
0 answers
24 views

running series of commands gives other result than running them on script [duplicate]

this is the script: #!/bin/sh rm -rf git/ mkdir -p git/{c,ds/{include,test},projects,quizzes,system_programming} find git/ -type d -exec touch {}/dummy.md \; This is the wanted result: git/ ├── c │   ...
user avatar
  • 11
0 votes
1 answer
3k views

How to resolve mkdir : missing operand error in linux?

I am very new to the linux , i am trying to make a directories from the files which is present in the current working directory, one directory is created but another one is not creating it's throwing ...
user avatar
  • 103
1 vote
1 answer
130 views

Create Directories From String Array

I have an array of directory names. I wanna create directories from the array. This is my code. WATCHED_MOVIE_LIST=("Tenet", "Inception", "Interstellar", "Arrival&...
user avatar
-1 votes
1 answer
51 views

I can't edit anything in my disk

I install Ubuntu latest version by formatting my windows( New volume:C) so that there is no data lose of my other disc. But now I can't delete/create a new folder/paste in this disc. Please tell me ...
user avatar
  • 1
5 votes
1 answer
1k views

Missing Downloads folder

I'm using Ubuntu 20.04 LTS. Suddenly today, my Downloads folder went missing. After googling the problem, I used mkdir to create a new Downloads folder. It was created successfully, but the files ...
user avatar
  • 51
0 votes
1 answer
779 views

sudo mkdir -p parent/child | Permission Denied

This seems like such a Day 0 problem. I need to create a 2-level folder structure. I tried: sudo mkdir parent/child >>> mkdir: cannot create directory ‘parent/child’: No such file or ...
user avatar
0 votes
0 answers
78 views

Any directories I create have permission 777

Anytime I create a directory (with mkdir, or if git creates it, etc) it's given these permissions: drwxrwxrwx 2 username usergroup 2 Apr 6 20:36 test/ I'd rather have permissions of ...
user avatar
  • 59
1 vote
2 answers
234 views

How to Make Directories with the Same Parent Name

How to Make Directories with the Same Parent Name? In my library, I have the following layout: DataFolder PATIENT A FOLDER1 FOLDER2 FOLDER# PATIENT B ...
user avatar
0 votes
0 answers
17 views

make and the mkdir command behaving differently on MacOX vs Ubuntu 20.04 [duplicate]

I have discovered something odd with the mkdir command when it is being used in a Makefile and it behaving differently between OSX and Ubuntu 20.04. Just wondering if this is expected behaviour, or ...
user avatar
0 votes
3 answers
102 views

What determines default directory permissions? [duplicate]

In Linux when I create a directory mkdir newdir then the newly created directory has these permissions and ownership: drwxr-xr-x 2 owner group My Question How can I make the default permissions for ...
user avatar
0 votes
1 answer
124 views

How to create a directory "dir" with subdirectories from subdir00 to subdir10 each of which contains subdirectoriess from subsubdir00 to subsubdir10?

So, dir contains subirectories from subdir00 to subdir10 and each subdirectory contains subirectoriess from subsubdir00 to subsubdir10. mkdir -p dir/subdir0{0..9}/subsubdir0{0..9} works fine, but how ...
user avatar
0 votes
1 answer
319 views

Run command one after the other from bash script

I'm trying to run some commands one after the other, but I think I'm making some mistake since only the first command is being run. I have a bash script that is like: #!/bin/bash sudo su && ...
user avatar
0 votes
0 answers
31 views

How to make tar extract to new directory with option to create directory if not present? [duplicate]

The tar command has option to extra a file (file_name.tgz) into given directory (directory_name). ie., tar -zxf file_name.tgz -C directory_name But it fails, if I try to run the above command, ...
user avatar
  • 151
3 votes
1 answer
230 views

mkdir variable Dont work

I need to create a script for school but it doesn't seem to work, #!/bin/bash echo "hoeveel vakken heb jij deze periode?" read $AANTAL if [ -d "/home/school/jaar_1/periode_4" ]; ...
user avatar
0 votes
1 answer
188 views

Directory creation using mkdir and touch [closed]

I need to create directory structure using mkdir for directory creation and touch for creating files using only relative paths.
user avatar
-1 votes
1 answer
162 views

How to create a new directory and switch into it from the command line? [closed]

Using the command line, how can I create new directory and navigate into it? For example, I would like to create a new directory named CSIS536 under my home directory, and change to the directory.
user avatar
0 votes
0 answers
580 views

How to create the directory structure using mkdir for directory creation and touch for creating files?

Command written by me: mkdir -p mydir/{ colors/{basic/{red,blue,green},blended/{yellow,orange,pink}},shape/{circle,square,cube},animals/{mammals/{platypus,bat,dog},reptiles/{snakes,crocodile,lizard}}} ...
user avatar
  • 1
1 vote
1 answer
943 views

mkdir inside sh, won't work

I am trying to create directory using mkdir inside sh file, when I do that the directory is created, but then when trying to do something to it, I get the message "rm: cannot remove '/testFolder': No ...
user avatar
  • 11
-1 votes
1 answer
8k views

Directory locations when using WSL

I'm new to the Ubuntu world and I need some help. (Windows 10, Ubuntu 18.04 LTS, x64 system type) I created a directory called "Submarine" using this : mkdir Submarine I want the directory "...
user avatar
1 vote
3 answers
6k views

Permission denied creating directory after switching user

I switched to a different user with the su command, and now I want to create a file/folder but "permission denied" error appears. safi_test4@safi-VirtualBox:/home/safi$ su safi_test4 Password: ...
user avatar
0 votes
0 answers
2k views

mkdir - read only system

Newby here (it has been decades since I have used UNIX.) Linux (ubuntu) on a chromebook. From the opening of the command shell I issue ls and I get a bunch of directories. I want to create a sub-...
user avatar
  • 1
1 vote
0 answers
471 views

Problem while executing a Makefile

i'm installing the Rocket-Chip repository. I'm following the instructions from https://github.com/chipsalliance/rocket-chip. The instructions are: $ git clone https://github.com/ucb-bar/rocket-chip....
user avatar
1 vote
0 answers
1k views

Cannot make folders in the mounted partition

I have mounted an NTFS partition on Ubuntu 18.04 using the ntfsfix command. However, I cannot create the folders either using mkdir or right-click → New Folder (the option is active, not greyed ...
user avatar
0 votes
2 answers
211 views

Is it possible to unzip documents into a directory which is created on the fly in a single command?

How can I achieve something like the following? unzip ./zipped_docs.zip ./new_folder | mkdir ./new_folder Or mkdir ./new_folder | unzip ./zipped_docs.zip ./new_folder I even tried mkdir ./...
user avatar
2 votes
2 answers
897 views

Create a folder with the date as part of the name in tcsh

I often need to create folders that start with the current date. For example 190627_ABCD. I've tried to create an alias command that gets the date to be printed: a newf 'mkdir `date '+%y%m%d'_`+=' ...
user avatar
  • 183
4 votes
1 answer
2k views

Creating directory on cifs mount returns error, but directory is indeed created

I have mounted an external disk connected to an ASUS router, which implements a Samba server. Everything works just fine except one annoying thing: creating a directory with mkdir returns an error ...
user avatar
0 votes
1 answer
3k views

mkdir in bash script: mkdir: cannot create directory ‘’

I have the following code on my bash script: #!/bin/bash # vars BACKUP_DIR= /opt/odoo12/database_backup_test # create a backup directory mkdir -p -v "${BACKUP_DIR}" When the script is executed, ...
user avatar
1 vote
1 answer
2k views

how to recover /etc/udev/rules.d file structure?

To troubleshoot driver issues I decided on renaming /etc/udev/rules.d into /etc/udev/rules.d.gold A brilliant idea, because now I am unable to revert my changes: mkdir: cannot create directory ...
user avatar
20 votes
3 answers
126k views

Can't make new dir with mkdir

When I run mkdir ../../bin/Release_Linux/Resources Im getting an error $ mkdir ../../bin/Release_Linux/Resources mkdir: cannot create directory ‘../../bin/Release_Linux/Resources’: No such file or ...
user avatar
0 votes
0 answers
27 views

Autocreation of folder in every location I worked

I share my user with a few people. I have an issue: every time I work in a directory, another directory inside my working directory is created. I checked my alias, bashrc - no any command to create a ...
user avatar
  • 1,506
-1 votes
1 answer
58 views

how to create folders with sub folders using defined variables?

I have files having below formatting: 2017-05-01-1500-00S.SRO___001_BH_Z 2017-05-01-1543-04S.SRO___001_BH_E 2017-05-01-1543-04S.SRO___001_BH_N 2017-05-01-1543-04S.SRO___001_BH_Z 2017-05-01-1600-00S....
user avatar
0 votes
2 answers
285 views

Using the mkdir terminal command

I've installed the dependencies, downloaded the source files, then installed the 'Reicast' Dreamcast console emulator. I now need to create the directory for the bios and flash files: mkdir .local/...
user avatar
0 votes
3 answers
295 views

Is there a way to create a new directory, containing subdirectories and documents?

For web-development practice I'm using a LAMP stack, on Ubuntu 17.10. For this I'm creating directories within /var/www, each directory is named after a project. To create a subdirectory I use the ...
user avatar
1 vote
1 answer
1k views

making new directory in Ubuntu

I'm new to Ubuntu (18.04 LTS) and need to install a software (Juliapro) on it. based on the manual, I installed the per-requisit by TERMINAL, but for installing the script file in below path >> ...
user avatar
0 votes
1 answer
39k views

cp: target ... is not a directory - why does this happen? [closed]

alan:~/LIME_SRC/soapySDR$ mkdir mybuild alan:~/LIME_SRC/soapySDR$ cd mybuild alan:~/LIME_SRC/soapySDR/mybuild$ cp /LIME_SRC/soapySDR/name "CMakeLists.txt" /LIME_SRC/soapySDR/mybuild cp: target '/...
user avatar
0 votes
1 answer
271 views

Copy differences between two dirs to a a new dir?

Edited version to a rushed question! When I run diff on two directories ex: $ diff Linux1 Linux2 The output being $ Only in Linux2: COMPLETELYDIFFERENT22.txt I want to the copy that file(not just ...
user avatar
2 votes
1 answer
6k views

why and how isn't mkdir working

how does mkdir work? I've been trying to install java, and when I type: mkdir -p /usr/local/java nothing happens except the terminal just writes it down. when I get to later steps, it says that ...
user avatar
  • 49
10 votes
2 answers
9k views

Why does mkdir fail (no such file or directory) in a script with BIN_DIR="~/bin/"?

Why does the mkdir command fail with: "No such file or directory"? #!/bin/bash set -e BIN_DIR="~/bin/" if [ ! -d "$BIN_DIR" ]; then mkdir "$BIN_DIR" fi
user avatar
  • 735
0 votes
1 answer
977 views

sudo mkdir permissions

I added the option umask=007 at the end of session optional pam_umask.so in the /etc/pam.d/common-session file. It is working fine as intended for all users. However, I can't figure out how to ...
user avatar
  • 1,069
0 votes
1 answer
6k views

Can't create folder using mkdir [duplicate]

I want to create a folder following the below procedure: set folder 2017/October/10 mkdir $folder But this isn't possible and I get the message: mkdir: cannot create directory '2017/October/10': No ...
user avatar
0 votes
2 answers
1k views

Moving files of specific type/extension from one directory to another?

Have a large folder filled with a large collection of different files.Ideally, I want to shift all the different files into their respective folders; so jpg files into the jpg folder etc. Original ...
user avatar
4 votes
1 answer
143 views

How do I recursively create a Textures directory in every existing directory in Bash and then delete them?

Lets say that I have the following structure: ./ ├── Dir1 ├── Dir2 │   ├── SubDir1 │   │   └── SubSubDir1 │   └── SubDir2 └── Dir3 └── SubDir1 Use this to make the test structure: mkdir -p ...
user avatar
5 votes
4 answers
3k views

How can I recursively make a directory in the last directories using the command line?

Let's say that I have the following directory structure where the name of the directories does not matter: currentDir/ Dir1 Dir1 Dir1 * Dir2 * Dir3 * Dir2 Dir1 *...
user avatar
8 votes
4 answers
26k views

Bash script to create a directory

I'm messing around with scripting, I am able to create a script which when run prompts me for a name for a new dir, creates it then creates several files, echoes lines out, then deletes it all. What ...
user avatar
8 votes
2 answers
34k views

Create the directory structure using mkdir and touch

I am learning Unix online and i came across this question to create a hierarchical structure. I have created the directories using mkdir command but I am stuck while creating the files inside ...
user avatar