All Questions
25 questions
-2
votes
1
answer
715
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. ...
1
vote
2
answers
960
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 ...
1
vote
1
answer
144
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
323
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 ...
0
votes
1
answer
615
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
1
answer
630
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
163
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
2
answers
758
views
Directory creation using brace expansion
mkdir Public/1 2 3 ----- This line creates folder 1 in the Public folder and creates folders named 2 and 3 in my pwd.
mkdir Public/{1..3} ---- This line creates folders 1,2,3 in Public only as ...
-1
votes
1
answer
137
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
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 ...
1
vote
1
answer
498
views
Fedora terminal script to create a directory and copy a file to directory
I need help to write a script to create a directory, so far I have mkdir ./directory.
This would create a folder called Directory, but I need to make it ask if the user wants to copy a file called ...
7
votes
2
answers
7k
views
Is it possible to detect file or folder creation/deletion in real time?
I want to monitor file or folder creation/deletion instantaneously, is it possible?
EDIT:I am using Ubuntu 16.04
-1
votes
1
answer
11k
views
Mkdir and Insmod - File Exists error
Any ideas what im doing wrong?
mkdir /mnt/zmg
mount -t cifs -o username=Administrator,password=*****,domain=Provisorio,noserverino //10.20.30.1/zmg /mnt/zmg
insmod /mnt/zmg/tntfs.ko
Heres a print of ...
0
votes
2
answers
4k
views
Single "mkdir" command to make a new directory and change to that directory at the same time? [duplicate]
Quick question:
Is it possible to use "mkdir" to make a new directory AND change to that directory at the same time using a single 'mkdir' command?
Whole question:
I have this question:
What ...
0
votes
1
answer
219
views
loop over file and make dir with 1st columns and and wget using the other columns
I have a file like this with multiple rows-
GSE55555 ftp://ftp.ncbi.nlm.nih.gov/geo/series/GSE55nnn/GSE55555/suppl/* ftp://ftp.ncbi.nlm.nih.gov/geo/series/GSE55nnn/GSE55555/matrix/*
GSE11111 ftp://...
0
votes
2
answers
2k
views
mkdir with seq command problem
I need to make 5 directories (name1, name2, name3, name4, name5) by command line using mkdir and seq.
If I use:
mkdir name{`seq -s , 1 5`}
It results in one directory: name{1,2,3,4,5}
What ...
13
votes
1
answer
2k
views
How many directories can be nested?
I'm curious, how many folders can be nested, and why? Is there a limit?
What I mean by nested is when folders are in this structure:
folder
|_ folder
|_ folder
|_ folder
|...
-5
votes
1
answer
2k
views
Creating 2 directories in a different location
sample_dir2
-- sample_dir
|-- admin
|-- cambridge
| `-- security
| |-- annex
| `-- parking
|-- history.exe
|-- markham
| |-- annex
| |-- building1
| `-- parking
`-- stenton
|...
0
votes
1
answer
1k
views
mkdir with brace expansion seems to fail when variables are used [duplicate]
Ubuntu 14.04.5 LTS
GNU bash, Version 4.3.11(1)-release (x86_64-pc-linux-gnu)
mkdir -vp test{1..3}/{a,b,c}
works fine
mkdir: created directory 'test1'
mkdir: created directory 'test1/a'
mkdir: ...
4
votes
2
answers
23k
views
Skeleton directory - how to add my own directories
I want to add a few directories to the skeleton directory. When I add new user I want to add my own directories to the new home directories.
1
vote
0
answers
640
views
When using linux acl mkdir and mkdir -p do different things
I have a directory bar:
# file: bar/
# owner: root
# group: root
user::rwx
user:little-jonny:rwx
group::r-x
mask::rwx
other::r-x
default:user::rwx
default:user:little-jonny:rwx
default:group::r-x
...
5
votes
2
answers
1k
views
Why does default setfacl fail for nested directories?
I am using sftp with the internal-sftp for debian.
What I'm trying to acomplish is to jail all users to a specific folder which is working fine. I also need to have a single user that has "admin" ...
6
votes
3
answers
4k
views
mkdir permissions do not correspond to umask (change depending on location)
Whenever I create new directories in my home (or its subdirectories) they do not have write permission, even though umask is set correctly. Files I make DO have write permission.
[mmanary@seqap33 ~]$ ...
7
votes
1
answer
25k
views
Will `mv` ever have the ability to create directories?
This question asks for the best way to create a directory when using mv if it doesn't exist. My question is why isn't this an inbuilt feature of mv? Is there some fundamental reason due to which this ...