Skip to main content

Questions tagged [mkdir]

The tag has no usage guidance.

0 votes
1 answer
8k views

mkdir error: no such file or directory

on a linux machine running CENTOS v 7.8.2003 I am in a directory Neutrinos I now do mkdir /pionloop/ this works. I then go to into this new directory pionloop and do mkdir /E_0.3 and this works as ...
user3584513's user avatar
1 vote
0 answers
748 views

Why I cannot create a folder that does not exist (simple-mtpfs mounted filesystem)?

I am mounting my USB-connected phone using simple-mtpfs, and it is shown as fuse.simple-mtpfs when I do df. I then switch to a folder on the external SDCARD of the phone, and try to create a folder ....
Luis A. Florit's user avatar
0 votes
2 answers
691 views

Creating nested directories

I want to write a bash script that will get a command line argument and create nested directories under the user home directory. E.g a/b/c mkdir -p $1/$2/$3 But I want create not just three levels ...
Խաչատուր Մելքոնյան's user avatar
0 votes
1 answer
1k views

sudo mkdir in bash script without password

I need to manually create a directory using the following command in a cronjob and not have to enter in a password: sudo mkdir /fold1/ I have read that I should not edit /etc/sudoers directly. What ...
iso's user avatar
  • 35
-1 votes
1 answer
136 views

How to create directory and files inside the directory

I want to know how to place files using touch command inside an directory whether it is multiple or single file.help is appreciated
Arun Sanga's user avatar
1 vote
2 answers
2k views

Can't mount /system read-write

When I make install reaver in termux the following error occurs: ./install.sh -D -m 755 wash /usr/local/bin/wash mkdir: cannot create directory ‘/usr’: Read-only file system make: *** [Makefile:140: ...
Suhofruit's user avatar
3 votes
1 answer
29 views

How can I quickly create all folders named {Single|Multi}Lane_{Single|Dual}Carriageway_{USA|Europe}

In Bash or Zsh, what is the shortest way to create a folder for each possible combination of substrings? Is there maybe even a notation such as mkdir {Single|Multi}Lane_{Single|Dual}Carriageway_{USA|...
Felix Dombek's user avatar
3 votes
1 answer
251 views

Regarding permissions on intermediate folders created using "mkdir -pm 764 a/b/c"

When I am using mkdir -pm 764 a/b/c then only c got that 764 permission, while a and b have default permission. Why does it so? Why doesn't all directories get 764 permission?
Subir Makur's user avatar
0 votes
1 answer
38 views

Find all directories NOT containing matched subdirectory and create them

I have the following directory structure: /media/storage/sqlbackup/CUSTOMER1 /media/storage/sqlbackup/CUSTOMER2 ... /media/storage/sqlbackup/CUSTOMER* Each CUSTOMER* directory may contain ...
Kahn's user avatar
  • 1,742
1 vote
0 answers
9k views

Best way to chown on newly created directory via mkdir -p

Suppose I did a mkdir -p a/b/c/d and directories a,b (a/b) already exists. so it will only create c/d. Now I want to only change the owner of directories c and d not a and b using chown. chown -R ...
aabco's user avatar
  • 11
0 votes
2 answers
2k views

Why does mkdir not work with wildcards? [duplicate]

nathan@gentoodesktop ~/Documents $ mkdir test nathan@gentoodesktop ~/Documents $ mkdir te*/test mkdir: cannot create directory 'te*/test': No such file or directory nathan@gentoodesktop ~/Documents $ ...
Gooberpatrol66's user avatar
2 votes
4 answers
27k views

Creating directory in bulk using mkdir in shell script

I am trying to create directory in bulk using mkdir through shell script below is the script #!bin/bash mkdir /tmp/report*/testfolder*/testdoank when i run it i got an error -bash: ./makefolder.sh: ...
heff's user avatar
  • 21
1 vote
2 answers
1k views

Create directory with timestamp of newest files

I am trying to create a directory based on the timestamp of the 2 newest files in a directory and then copy those 2 files in to the newly created directory. SO for example -rw-r--r-- 1 root root 0 ...
Rhus's user avatar
  • 13
10 votes
5 answers
5k views

Create the same subfolders in another folder

I have a directory foo with subdirectories. I wish to create the same subdirectories names in another directory without copying their content. How do I do this? Is there a way to get ls output as a ...
havakok's user avatar
  • 237
0 votes
2 answers
1k views

How to Move file using Script

I have been asked to design a script which when executed, moves the file types given in the arguments to the respective folder(creates the folder with file type if not there). Like suppose I give ...
Aayush Upadhyaya's user avatar

15 30 50 per page
1 2 3
4
5
11