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)
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)
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)
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)
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)
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)
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)
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)
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)
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 SUNOS
mkdir
mkdir(1) User Commands mkdir(1)NAME
mkdir - make directories
SYNOPSIS
mkdir [-m mode] [-p] dir...
DESCRIPTION
The mkdir command creates the named directories in mode 777 (possibly altered by the file mode creation mask umask(1)).
Standard entries in a directory (for instance, the files ".", for the directory itself, and "..", for its parent) are made automatically.
mkdir cannot create these entries by name. Creation of a directory requires write permission in the parent directory.
The owner-ID and group-ID of the new directories are set to the process's effective user-ID and group-ID, respectively. mkdir calls the
mkdir(2) system call.
setgid and mkdir
To change the setgid bit on a newly created directory, you must use chmod g+s or chmod g-s after executing mkdir.
The setgid bit setting is inherited from the parent directory.
OPTIONS
The following options are supported:
-m mode This option allows users to specify the mode to be used for new directories. Choices for modes can be found in chmod(1).
-p With this option, mkdir creates dir by creating all the non-existing parent directories first. The mode given to intermedi-
ate directories will be the difference between 777 and the bits set in the file mode creation mask. The difference, how-
ever, must be at least 300 (write and execute permission for the user).
OPERANDS
The following operand is supported:
dir A path name of a directory to be created.
USAGE
See largefile(5) for the description of the behavior of mkdir when encountering files greater than or equal to 2 Gbyte ( 2**31 bytes).
EXAMPLES
Example 1: Using mkdir
The following example:
example% mkdir -p ltr/jd/jan
creates the subdirectory structure ltr/jd/jan.
ENVIRONMENT VARIABLES
See environ(5) for descriptions of the following environment variables that affect the execution of mkdir: LANG, LC_ALL, LC_CTYPE, LC_MES-
SAGES, and NLSPATH.
EXIT STATUS
The following exit values are returned:
0 All the specified directories were created successfully or the -p option was specified and all the specified directories now
exist.
>0 An error occurred.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
|CSI |enabled |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
SEE ALSO rm(1), sh(1), umask(1), intro(2), mkdir(2), attributes(5), environ(5), largefile(5), standards(5)SunOS 5.10 1 Feb 1995 mkdir(1)