Questions tagged [mkdir]

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

Filter by
Sorted by
Tagged with
2
votes
1answer
56 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" ]; ...
0
votes
1answer
71 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.
0
votes
0answers
89 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}}} ...
1
vote
1answer
85 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 ...
0
votes
1answer
959 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 "...
1
vote
3answers
2k 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: ...
0
votes
0answers
219 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-...
0
votes
0answers
95 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....
0
votes
0answers
447 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 ...
0
votes
2answers
58 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 ./...
2
votes
2answers
278 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'_`+=' ...
4
votes
1answer
1k 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 ...
0
votes
1answer
1k 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, ...
1
vote
1answer
963 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 ...
6
votes
2answers
39k 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 ...
0
votes
0answers
23 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 ...
-1
votes
1answer
46 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....
0
votes
2answers
221 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/...
0
votes
3answers
58 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 ...
1
vote
1answer
860 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 >> ...
0
votes
1answer
22k 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 '/...
0
votes
1answer
96 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 ...
2
votes
1answer
3k 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 ...
10
votes
2answers
6k 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
0
votes
1answer
672 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 ...
0
votes
1answer
4k 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 ...
0
votes
2answers
926 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 ...
4
votes
1answer
110 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 ...
5
votes
4answers
2k 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 *...
8
votes
4answers
16k 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 ...
5
votes
2answers
19k 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 ...
9
votes
4answers
4k views

How can I have mkdir cd into the newly-created directory? [duplicate]

Frequently, I type these commands in bash: mkdir something cd something I almost never do this: mkdir something ls # something in the current directory, not ./something/ And never this: mkdir ...
2
votes
1answer
2k views

mkdir : invalid option — 'R'

I wanted to run a bunch of mkdir commands to create folders: mkdir -p mydir/animals/mammals/{platypus,bat,dog} mkdir -p mydir/animals/reptiles/{snakes,crocodile,lizard} mkdir -p mydir/colors/basic/{...
0
votes
0answers
30 views

Two direcories.. Two capacities.. One drive.. How to fix this?

This is my predicament You see here one drive (the Intel SSD shown on disks app) which is labeled as /device/sdb yet some how an other drive (WD HDD) labeled as /device/sdc link to the same directory ...
9
votes
5answers
1k views

Create a folder “Photo” inside all directories recursively

I have a bunch of folders and I want to loop over all those folders and in each folder create another folder named "Photo" F1 --F11 ----F111 ----F112 --F12 I want to have: F1 --Photo --F11 ----...
1
vote
2answers
5k views

creating directory in ftp server using ncftp command from ubuntu terminal

How to create a directory in a specific path in Ftp server by using Ncftp command from Ubuntu terminal. Is it possible?
2
votes
1answer
181 views

How to find files and copy to not existing folder in one command?

For example: find /usr -type f -name "*.txt" -exec cp -r {} ~/txts/ \; Works fine in case when we have existing directory txts. As far as I can understand - cp have no flags to resolve this case. ...
0
votes
1answer
283 views

Create directories with names similar to files

I have a lot of .mp4 files, nearly 140, and I want to create directories with similar names to that of the files, but bash won't allow me to mkdir, saying file exists How can I do it ?
2
votes
2answers
617 views

Why I could not create a folder named '/' using terminal?

I tried creating a folder with name '/' using the mkdir command. But it returned a message saying: mkdir: cannot create directory ‘/’: File exists I tried quoting the the name '/', and adding escape ...
2
votes
1answer
32k views

mkdir says that file exists when it doesn't [duplicate]

When I run mkdir ~/.ipython/extensions/ I get mkdir: cannot create directory ‘/home/droudy/.ipython/extensions/’: File exists However when I navigate to /home/droudy, there is no .ipython folder ...
3
votes
3answers
7k views

folder not shown when being created by command line

I have an issue when I am creating a folder by command line. I create it by typing: mkdir TEST and it does not appear on the graphical desktop view. But if I type the command "ls" in the Terminal I ...
0
votes
2answers
911 views

The mkdir command not allowing to make changes in any of its files

I created a folder in Desktop and created some .asm files in there. Now the folder's owner is "root" and I cant change any of it's file rather than first time. It open files in "Read-Only" Mode!
0
votes
2answers
271 views

Terminal starts with a 'mkdir' error

I am a rookie in the Linux space, especially Ubuntu. For the past few days, I have been getting an error in the terminal every time I start the console. The error says mkdir: cannot create directory ...
6
votes
1answer
12k views

I can't update any packages nor can upgrade and all this started when I tried to install flashplugin which popup after I tried to upgrade last time

sudo apt-get update sudo: unable to mkdir /var/lib/sudo: No such file or directory [sudo] password for md: E: List directory /var/lib/apt/lists/partial is missing. - Acquire (2: No such file or ...
1
vote
1answer
2k views

problem in running teamviewer11

i installed team viewer using following https://www.teamviewer.com/en/help/427-how-do-i-install-teamviewer-on-my-ubuntu-system link. after installing, while running in sudo it shows-- Init... *** ...
1
vote
1answer
1k views

problems with backup and tar in command line

I am studying for a Linux certification from the Linux foundation but I have some questions about one lab. Here is the lab: Create a directory called backup and in it place a compressed tar archive ...
126
votes
7answers
207k views

Is there a way to create multiple directories at once with mkdir?

If I wanted to create multiple directories (on the same level) and then feed it a comma seperated list of directory names (or something to that effect)?
0
votes
3answers
678 views

How to make a line of directories with one command?

With the mkdir command if I want this location to exist ~/test/panda/fat when only the ~ part of it exists so far I have to do something like this: mkdir ~/test mkdir ~/test/panda mkdir ~/test/panda/...
10
votes
4answers
45k views

mkdir with date name? [duplicate]

In Linux shell, am I able to create a directory but the name would be a string returned from another program? And if I am able, how to? In particular I am asked to create a new directory in my Home, ...
0
votes
1answer
64 views

udevadm trigger not permitted message on the screen

The solution for the problem described is given in askubuntu, I tried booting with bootable USB. The options of Install Ubuntu and try Ubuntu were displayed but I am not sure which option to choose. ...