Skip to main content

Questions tagged [mkdir]

The tag has no usage guidance.

0 votes
1 answer
66 views

Missing files but system said it exist!

I have a working folder with all output files generated from command. When I tried to re-coding one of my file, after a few attempts, I realized the files in my folder left only 1/3 of them! I first ...
web's user avatar
  • 193
1 vote
1 answer
154 views

fstab and systemd automount overlay

On an embedded device based on Yocto Linux my rootfs is RO, while I have an additional partition for RW data. Now I want to automount at boot an overlay onto /etc stored on a different partition. Here ...
Martin H.'s user avatar
  • 181
1 vote
2 answers
116 views

Can't create included directory [duplicate]

I'd like to create a new directory that looks like /dir1/dir2/dir3/dir4 but I can't. If I create the directories one by one from the parent and new parent directories, everything works: lm@debian:~$ ...
ant's user avatar
  • 29
0 votes
0 answers
37 views

Why did this mkdir not work properly? [duplicate]

Why did this mkdir not work properly? The folder is strangely named as {a. mkdir -p myfile/{a/a{1..10}, b/b{10..30}, c/c{1,2,3}}
internet's user avatar
  • 101
1 vote
1 answer
355 views

sudo mkdir /srv/www permission denied

I'm setting up a new webserver on Debian. As my previous install had everything located in /srv/www I want to use the same setup to avoid rewriting a bunch of config files. However executing mkdir /...
user avatar
0 votes
0 answers
1k views

Inside Docker: mkdir(-p): No such file or directory

I have encountered a strange problem where the mkdir -p command fails to create a directory and returns the following error message: [root@202 ~]# pwd /root [root@202 ~]# mkdir -p a/b/c mkdir: cannot ...
Mer's user avatar
  • 9
-2 votes
1 answer
631 views

how to create a directory that already exists with another name

i want to create directory called "A" inside my home directory but i don't know if such a directory already exists. i want to write a command that creates the directory if it does not exist. ...
bara's user avatar
  • 19
2 votes
1 answer
274 views

touch/mkdir seems to ignore default ACL

I am pretty sure it is a stupid mistake but I can't seem to figure it out by myself, so please have a look. I set up an ACL for the current folder like so: zigbee2mqtt@nuc:/tmp/folder$ getfacl . # ...
milkpirate's user avatar
0 votes
2 answers
2k views

move and make directory

I know its a big classical but I didn't found the exact situation that concerns me I need a mkdir+mv command that can be invoked like that : mvdir /home/user/Documents/irs.pdf /mnt/work/45/223/insight/...
aaa's user avatar
  • 167
0 votes
1 answer
163 views

replacing explicit user names with variables in mkdir and chown

What specific changes need to be made in the commands below in order to use a variable username and a variable user_home to create a subdirectory within the current user's home and then to change ...
CodeMed's user avatar
  • 5,269
0 votes
1 answer
20 views

/dev/sda4/ on USB stick isn't available after formatting. 'Discs' shows the following:

size: 58 GB contents: unknown device: /dev/sda4 partition type: basic data When I ran the format, I selected the type which I expected result in type of Linux. I found a similar issue from 2019, but ...
user546640's user avatar
0 votes
0 answers
364 views

mkdir - create directory (with ":" in its name) does not work in specific directory, works in others

I am trying to create a directory for a movie on my Plex media server and ran into a strange issue. When I try to make a directory with the movie name ("Borat: Cultural Learnings of America for ...
Saar Koren's user avatar
1 vote
1 answer
773 views

Create directory using filenames and move the files to its respective folder

My question is a bit different than: Create directory using filenames and move the files to its repective folder Since in the same folder I have two similar copy of each file like: 001.txt and 001(1)....
Maxfield's user avatar
  • 161
0 votes
1 answer
296 views

How can i create sub directories within a directory? [closed]

I am trying to make a photo organizer with a zsh shell script. But i am having trouble creating sub directories within each main directory(based on date). Currently the script starts from a folder i ...
Mathijs's user avatar
1 vote
2 answers
911 views

Creating and arranging files into folders based on date and time in file name

I have many files in a folder Main which are named like these: 2021_10_15_23_35_SIP_CDR_pid3894_ins2_thread_1_4718.csv.gz 2021_11_24_21_15_Gi_pid25961_ins2_thread_1_6438.csv.gz ...
nidooooz's user avatar
1 vote
1 answer
587 views

Why does mkdir messes up special characters (german umlauts)?

I have a system which is set up with Debian. Running the command mkdir xx_ü on this system, creates a directory called 'xx_'$'\303\274'. Running the same command on a system that is set up with ...
Thomas's user avatar
  • 166
0 votes
1 answer
99 views

Sorting long list of files into multiple sub directories based on name

I have a group of 1000+ files that are labeled using text and date in a folder /home/dir/dir2/oldspot with below format: File taken on 01/07/2020 at 23:08 elevation 5 is aaaaaa-bbbb-cc10dddd-L1-...
Lucas Djeu's user avatar
1 vote
1 answer
136 views

Setting setuid on `mkdir` without making it as executable

I am setting setuid on mkdir without making it as executable. chmod u+s /usr/bin/mkdir chmod u-x /usr/bin/mkdir [root@rhel-85 /]# ls -l /usr/bin/mkdir -rwSr-xr-x. 1 root root 84664 Jul 9 2021 /...
meallhour's user avatar
  • 181
0 votes
1 answer
312 views

why when hooking syscalls from the kernel, is the pid of kill, zsh, but the pid of mkdir is mkdir?

I am writing my own rootkit to learn about Linux kernels. I wanted to hook into a syscall and alter the credentials of the current task to be that of roots (i.e.euid=0). I saw you could do this with ...
sys_overflow's user avatar
4 votes
1 answer
6k views

How to create folders using user input for the name and number

The user will be asked 2 variables which will be the name of the folder and the number of folder they want to create. So if a user inputs sea and 3, the output should be: sea, sea2, sea3 read -p "...
Raegor's user avatar
  • 43
4 votes
4 answers
976 views

How create many nested directories and defining the permission to all them in one command?

In Linux the following two commands work as expected: mkdir -m 555 new_directory mkdir -p a/b/c But the following does not work as expected: mkdir -m 555 -p a/b/c the 3 directories are created but ...
Manuel Jordan's user avatar
0 votes
1 answer
449 views

Creating a directory from many variables

I want to create a script that creates a new folder with the name of the first argument in the directory specified as the second argument. #!/bin/bash -e ## Passing Arguments (fastq data and ...
Manuel Dominguez Becerra's user avatar
0 votes
1 answer
9k views

mkdir gives "No space left on device" message but sudo mkdir works [duplicate]

When I try to use mkdir test in /home/, I get mkdir: cannot create directory ‘test’: No space left on device. I've deleted over 1Gb of files and restarted some processes that were using deleted files, ...
vietnamese_chowder's user avatar
0 votes
1 answer
561 views

Using mkdir -p, is it possible to create files within subdirectories using regular expressions? [duplicate]

I am trying to create a file using the mkdir -p command. Using mkdir -p ~/1/2/3/4, how would I put files (w,x) into /2, and (y,z) into /3 all in a single command? I know I could use a touch command ...
Opensource1397's user avatar
-1 votes
1 answer
2k views

mkdir error, permission denied

i was installed spotify yesterday with snap in kali linux, then i run with snap run spotify and i get error like this : snap run spotify WARNING: cgroup v2 is not fully supported yet, proceeding with ...
Rachmat Ashari's user avatar
0 votes
0 answers
79 views

mkdir appending carriage return when creating folders based on variable names [duplicate]

Context OS: Ubuntu 18.04.6 LTS Text editor: GNU nano, 2.9.3 In the BASH script below, I'm trying to create directories using mkdir. The name of each directory is determined by a combination of ...
akoontz11's user avatar
0 votes
1 answer
580 views

mkdir as another user based on configuration file

We have a shared Linux environment where most files are mounted to many machines on a NFSv3 share, which we do not control. Since we only have basic filesystem permissions available (No ACLs), we are ...
anthozep's user avatar
  • 101
2 votes
1 answer
159 views

If the `-p` flag not needed anymore in `mkdir` 9.0?

I can't find any reference of this change of behaviour $ mkdir --version mkdir (GNU coreutils) 9.0 Copyright (C) 2021 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <...
Jon's user avatar
  • 123
0 votes
1 answer
2k views

Permissions Issue creating folder on remote host with Jenkins

I'm having an issue with using Jenkins to create a folder on a remote host. The remote host in this case is a stock Ubuntu 20.04 AMI EC2 server with the default ubuntu user. I am connecting with the ...
Programster's user avatar
  • 2,279
0 votes
0 answers
244 views

Mounting subdir to a new NFS

I have a directory that is mounted with NFS. 10.159.31.81:/var/lib/phone /var/lib/phone nfs hard,bg,intr,vers=3,noatime 0 0 I want to test my new NFS servers but I don't want to move everything over. ...
Dovid Bender's user avatar

15 30 50 per page
1
2 3 4 5 6