Skip to main content

All Questions

Tagged with
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
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
-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
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
0 votes
1 answer
348 views

Solaris 9 Fail to mkdir - no permission

In solaris 9 (5.9) I fail to mkdir with user builder, the user exist in the group defined as owner for that path. bash-2.05$ groups builder other root sys bash-2.05$ and this is the file ...
ilansch's user avatar
  • 415
2 votes
3 answers
238 views

Moving files to directories named after the first 6 digits in the file name

I've got thousands of raw photos (.nef) and relative settings (same filename but .xmp extension) in a single directory on a QNAP nas. My goal is to automate the creation of subdirs named like yyyy-mm ...
Francesco Bacigalupo's user avatar
4 votes
2 answers
5k views

Is there any Linux command to create a new file in a folder and auto create this folder if not exist? [duplicate]

I know this problem can solve by use combine mkdir and touch commands. But I want to know is there any other solution only use one command.
glider's user avatar
  • 41
4 votes
5 answers
430 views

Script tries to create files even though it shouldn't have to?

I have a folder which contains some folders, these folder are moved very often so I made a script to see if they exist, and if not then create them. This is what I did to (which I though would) ...
DisplayName's user avatar
  • 11.8k
9 votes
2 answers
11k views

Deleted /tmp accidently

Accidently, I ran sudo rm -r /tmp, is that a problem ? I recreated it using sudo mkdir /tmp, does that fix the problem ? After I recreated the directory, In the places section in the sidebar in ...
Amr Ayman's user avatar
  • 435