Questions tagged [mkdir]
The mkdir tag has no usage guidance.
159
questions
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 ...
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-...
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 /...
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 ...
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 "...
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 ...
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 ...
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, ...
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 ...
-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 ...
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 ...
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 ...
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 <...
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 ...
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. ...