Skip to main content

All Questions

Tagged with
-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
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
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
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
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
2 answers
664 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 ...
Lucifer G's user avatar
-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
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
1 vote
1 answer
484 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 ...
Malcolm's user avatar
  • 11
7 votes
2 answers
6k 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
kenn's user avatar
  • 783
-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 ...
firewallcj's user avatar
0 votes
2 answers
3k 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 ...
Matt's user avatar
  • 385

15 30 50 per page