Questions tagged [mkdir]
The mkdir tag has no usage guidance.
159
questions
6
votes
4
answers
9k
views
Issue on created folder permissions: temporary flag
I have a strange issue with directory permissions.
From within a C++ app, I create a folder with:
mkdir( "foldername", 777 );
But I got into an issue when attempting to create a file in that ...
4
votes
2
answers
931
views
Command for creating a directory and navigating into it directly? [duplicate]
Quite often I need to perform this two commands:
mkdir abc
cd abc
I am curious whether there is a simple command (or an alias that I can create and use) to do it in one go, like
user@GROUP:~$ mdcd ...
-5
votes
1
answer
2k
views
What does -p do when creating directories
What does the following command do to my system?
$ mkdir -p /tmp/aes
I typed the following command into my command line and it executes as expected.
I know the folder is created as when I attempt ...
252
votes
4
answers
196k
views
Combined `mkdir` and `cd`? [duplicate]
is there any way (what is the easiest way in bash) to combine the following:
mkdir foo
cd foo
The manpage for mkdir does not describe anything like that, maybe there is a fancy version of mkdir? I ...
192
votes
2
answers
284k
views
How to create nested directory in a single command? [duplicate]
Apparently, it's not possible to create a nested directory in a single command?
$ sudo mkdir x/y/z
mkdir: cannot create directory 'x/y/z': No such file or directory
47
votes
9
answers
20k
views
mkdir -p for files
mkdir -p will create a directory; it will also make parent directories as needed.
Does a similar command exist for files, that will create a file and parent directories as needed?
5
votes
5
answers
308
views
How to create directory ranging from 1 to nth?
In my scenario, I have some photos and I want to keep them separate. At present, I am doing mkdir gallery1 gallery2 gallery3 gallery4 gallery5 gallery6, but this is a pain. I think we can do it more ...
569
votes
4
answers
693k
views
recursive mkdir
Is there a linux command that I'm overlooking that makes it possible to do something along the lines of:
(pseudo)
$ mkdir -R foo/bar/zoo/andsoforth
Or is there no alternative but to make the ...
279
votes
13
answers
149k
views
Is there a one-liner that allows me to create a directory and move into it at the same time?
I find myself repeating a lot of:
mkdir longtitleproject
cd longtitleproject
Is there a way of doing it in one line without repeating the directory name? I'm on bash here.