02-17-2018
No problem
Quote:
Originally Posted by
Scott
I don't really follow you. Nothing will be lost with 'mkdir', despite your earlier assertion that "I think that `mkdir -p` overwrites the directories. I want to avoid that".
mkdir doesn't do anything except
ma
ke
directiories. It doesn't
delete anything.
It's a Unix thing - 'do one thing, and do it well'
Not an assertion, just a clarification. Sometime there might be some option or whatever to delete things. But as you mention it's ok.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
how do i create directories using command in my unix system, i could do with knowing how to do it with absolute pathnames and relative pathnames please (3 Replies)
Discussion started by: carlvernon
3 Replies
2. HP-UX
I have two login accounts 'fup04a' and 'fup04c' on the same unix box
after log in using 'fup04a' and if I try creating a directory 'new'
drwxrwxr-x 2 fup04a fup04a 4096 Nov 14 14:06 new
but if i try the same with fup04c
drw-rw-r-x 2 fup04c fup04c 4096 Nov 14... (3 Replies)
Discussion started by: vivek_damodaran
3 Replies
3. Shell Programming and Scripting
Hi,
Can someone help me with creating a bash shell script.
I need to create a script that gets a positive number n as an argument.
The script must create n directories in the current directory with names like map_1, map_2 etcetera. Each directory must be contained within its predecessor. So... (7 Replies)
Discussion started by: I-1
7 Replies
4. Shell Programming and Scripting
I have many pdf files with similar naming conventions as this one: AC41_AC85_86_AC128_129_MC171_173_SF_207_FMV.pdf. It is a pdf file containing evaluations for these locations: AC41, AC85, AC86, AC128, AC129, MC171, and MC173.
I want to create a directory for every location and put the... (3 Replies)
Discussion started by: ndnkyd
3 Replies
5. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Ok i need to create a directory within another directory in one command. I'm already in a directory to. I need to... (6 Replies)
Discussion started by: gangsta
6 Replies
6. Shell Programming and Scripting
I have an interesting requirement. I have declaried an array like :-
arr=`find . ! -name "." | xargs -I {} echo {} | cut -c 2-${#}`
Then i will try to access the array elements like :-
i=0
for i in ${arr}; do
Here comes the confusions, the array elements are basically dir and files stored... (2 Replies)
Discussion started by: Renjesh
2 Replies
7. Shell Programming and Scripting
Hi,
I am looking for the syntax to provide a timestamped log_file in expect.
Basically I want the equivalent of:
/outputs/`date +%d%m%y`/session`date +%H%M`
But scripted in expect so it can be handed over to the logfile function.
I have tried playing around with the timestamp... (1 Reply)
Discussion started by: krypton
1 Replies
8. Shell Programming and Scripting
i'm trying to write a script that has 2 variables, and uses the 1st variable as a number and the 2nd a name to create directories. so if you typed in ./myscript 5 week, it would create 5 directories named week1 - week5. whenever i run this, i get an error message saying week5 already exists, so i... (3 Replies)
Discussion started by: layne2kim
3 Replies
9. Shell Programming and Scripting
how can i move "dataName".sql.gz into a folder called 'database' and then move "$fileName".tar.gz * .htaccess into a folder called 'www' with the entire gzipped file being "$fileName".tar.gz? Is this doable or overly complex.
so
mydemo--2015-03-23-1500.tar.gz
> database
-... (5 Replies)
Discussion started by: wyclef
5 Replies
10. Shell Programming and Scripting
Hi all. I'm hitting a problem creating a tar archive in one directory from files located in a different directory. It fails when I replace the absolute paths with variables in the script but works if I just run tar on the cmdln. E.g.
#!/bin/ksh
BASE=$PWD
STAGE=$BASE/stage
LOG=$BASE/log... (4 Replies)
Discussion started by: user052009
4 Replies
LEARN ABOUT DEBIAN
dpns-mkdir
DPNS-MKDIR(1) DPNS User Commands DPNS-MKDIR(1)
NAME
dpns-mkdir - make DPNS directory in the name server
SYNOPSIS
dpns-mkdir [-m mode] [-p] path...
DESCRIPTION
dpns-mkdir creates the specified DPNS directories in the name server.
This requires write permission in the parent directory. The owner ID and group ID of the new directories are set to the requestor's real
user ID and group ID, respectively.
path specifies the DPNS pathname. If path does not start with /, it is prefixed by the content of the DPNS_HOME environment variable.
The dpns-mkdir command has the following options:
-m specifies the mode to be used. Default mode is 777.
-p creates all the non-existing parent directories first. The mode set for the created intermediate directories is the logical differ-
ence between 0777 and the user umask but at least 0300.
EXIT STATUS
This program returns 0 if the operation was successful or >0 if the operation failed.
SEE ALSO
Castor_limits(4), dpns_chmod(3), dpns_mkdir(3), dpns_umask(3)
AUTHOR
LCG Grid Deployment Team
DPNS
$Date: 2001/10/04 12:12:54 $ DPNS-MKDIR(1)