Sponsored Content
Homework and Emergencies Homework & Coursework Questions Creating directories within a directory? Post 302461957 by gangsta on Tuesday 12th of October 2010 09:44:50 PM
Old 10-12-2010
oh yea i fixed my problems, but now im having trouble creating two directories in the same

test (directory1)
test1 (directory2)
test2 (directory3)

directory 2 and 3 are in directory 1

i tried mkdir -p test/test1/test2, but test3 is not going into directory 1 with directory 2
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

creating directories

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

creating directories on the same box

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

Creating date directory and moving files into that directory

I have list of files named file_username_051208_025233.log. Here 051208 is the date and 025233 is the time.I have to run thousands of files daily.I want to put all the files depending on the date of running into a date directory.Suppose if we run files today they should put into 05:Dec:08... (3 Replies)
Discussion started by: ravi030
3 Replies

4. Shell Programming and Scripting

help needed with creating challenging bash script with creating directories

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

5. Shell Programming and Scripting

Creating Directories

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

6. UNIX for Dummies Questions & Answers

creating separate directories according to file extension and keeping file in different directory as

unix program to which a directory name will be passed as parameter. This directory will contain files with various extensions. This script will create directories with the names of the extention of the files and then put the files in the corresponding folder. All files which do not have any... (2 Replies)
Discussion started by: Deekay.p
2 Replies

7. Shell Programming and Scripting

need help with creating directories and variables

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

8. Shell Programming and Scripting

How to list all the files, directories and sub-directories in the current path except one directory?

Can anyone come up with a unix command that lists all the files, directories and sub-directories in the current directory except a folder called log.? Thank you in advance. (7 Replies)
Discussion started by: Manjunath B
7 Replies

9. Shell Programming and Scripting

Archiving and moving files into directories, creating directories, etc.

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

Creating new directories

I want to create a new system of directory structure for example mkdir -p ./iv.sac/resu/hhz.d However, I think that `mkdir -p` overwrites the directories. I want to avoid that and am doing something as follows in my bash script echo -e "\nCreating directories:" ... (6 Replies)
Discussion started by: kristinu
6 Replies
kitcap(5)							File Formats Manual							 kitcap(5)

Name
       kitcap - kit descriptor database for gentape and genra utilities.

Description
       The  file is a database for kit descriptors containing product codes, directories, files, and subsets that make up a product description to
       be used by or to create distribution media.  All fields are separated by colons (:) with a backslash () at the end of  a  line	indicating
       continuation.   Lines  starting	with a number sign (#) are considered comments and are ignored.  Comment fields with a kitcode description
       are delimited by an opening number sign (#) and a closing colon (:).

       The following entry examples are for TK50 and MT9 media types:
       Product-codeTK | Product Description:directory1:directory2:directory3:
	    SPACE:SPACE:SPACE:INSTCTRL:subset1:subset2:subset3:subset4:subset5

       Product-codeMT | Product Description:directory1:directory2:directory3:
	    SPACE:SPACE:SPACE:INSTCTRL:subset1:subset2:subset3:subset4:subset5:
	    %%2:
	    subset6:subset7:subset8:subset9:subset10

       The following parts make up the descriptor for magnetic tape media:

       Product-code
	      This is an arbitrary name made up of letters and/or numbers unique to the product that it describes.  Typical codes include a  prod-
	      uct identifier and a version identifier, as indicated in the previous examples.

       Media-code (TK or MT)
	      The media-code is a 2 letter reference that describes the type of media the files will be written to.  The media code must be either
	      TK for TK50 or MT for 9-track magnetic tape devices.  During run time, the utility probes the device to be written to and determines
	      if  it is a TK50- or MT9-type device.  It then appends either TK or MT to the kitcode given on the command line and searches for the
	      kitcode (product-code/media-code) in the kitcap file.

       Product Description
	      This field is a description of the software product that is being created by the utility and replaces the NAME field in the file	of
	      all the subsets that make up a product.  This is an optional field for magnetic tape media.

       Directories
	      The magnetic tape media production utility has the ability of producing multi-product tapes.  That is, it can take subsets from dif-
	      ferent products that are based in different directories and merge them together to form a third product, which is a  combination	of
	      the  original  products.	Directory entries provide the full path locations of where the subsets that are to be put on media will be
	      stored.  There must be at least one directory entry for each kitcap descriptor.

       SPACE
	      The SPACE file is a place holder for tape records composed of 1k of NULL characters. Three SPACE files are used as  dummy  files	to
	      ensure compatibility with ULTRIX operating system kits.

       INSTCTRL
	      The INSTCTRL image contains setld control information.

       Subsets
	      This  field  provides  a list of subsets or files that are to be either written to the magnetic tape media or verified from the mag-
	      netic tape media.  Each subset listed must be stored in one of the directories listed in that particular kitcap  descriptor.   If  a
	      file or subset is stored in a subdirectory of one of the directories listed in the kitcap descriptor, it is possible to include that
	      sub-path with the subset/filename entry instead of listing the entire path/subpath as another directory  listing.   For  example,  a
	      directory listed in the kitcap descriptor under the rules given in the Directories section is listed as:
	      /KITS/MYPRODUCT/001
	      A particular subset or file that a user would like to include on the media is stored in:
	      /KITS/MYPRODUCT/001/subdirectory/subset
	      Since the subdirectory/subset specification is part of the directory tree, it is not necessary to include the full path subdirectory
	      in the directory listing.  An alternative is to include the subdirectory path with the subset name in the subset list.  For example:
	      MY-PROD-001 | This is a good product:
		   /KITS/MYPRODUCT/001:SPACE:SPACE:SPACE:
		   INSTCTRL:subset1:subset2:subdirectory/subset3:subset4

       Volume identifier (MT9 media only)
	      The volume identifier is optional.  Multi-tape support is available for products that have subsets or files that take up	more  room
	      than is available by a single 9-track magnetic tape.  If the subset list results in an end-of-tape condition, the subset list can be
	      split into any number of multi-volume sets by placing (where n is the volume number of the next tape) anywhere  appropriate  in  the
	      subset  list.   The  subsets listed between the volume identifiers must fit on a single piece of media.  By default, the subset list
	      located directly after the directory list is always considered the first volume.	Therefore, a volume identifier for the first  vol-
	      ume in a multi-volume kit descriptor is not necessary.

       The following example shows a entry for disks:
       Product-codeRA:partition:
	    dd=/:Product_Description:
	    directory1:directory2:directory3:
	    instctrl:subset1:subset2:subset3:subset4:subset5:
	    dd=SUB/DIR:Product_Description:
	    instctrl:directory1:directory2:directory3:
	    subset1:subset2:subset3:subset4:subset5

       The following parts make up the kitcap descriptor for disk media:

       Product-code
	      Same as for magnetic tape.

       Media-code
	      The media code for disks is RA and is appended to the product-code provided by the user at run time, by the utility.

       Disk Partition
	      This field is the partition where you want the software written to on the disk.

       dd=
	      This  field  tells the utility what directory you want the subsets written to on the disk media that is being created.  The contrac-
	      tion can be thought of as the ``destination directory'' for the subsets.	This field is required and allows a hierarchial  structure
	      for  those  who want to put multiple products on the same disk, or want to separate parts of one product into different areas on the
	      disk.

       Typically, a disk is mounted by the utility onto a temporary mount point under This location becomes the disks root directory.  If  a  user
       wants to have only one directory for an entire product, a valid entry would be dd=/.  This entry tells the utility to write all the follow-
       ing subsets under the mount point.

       In the disk kitcap descriptor example given previously, the first five subsets are being written to the mount point, or root directory, for
       the  disk  media  being made.  Then a new directory on the disk media is made, and the next five subsets are written into that directory on
       the disk media.

       It is important to note that the top-level directory of the media disk is always considered the mount point used by the script and is  ref-
       erenced	by dd=/.  Any subdirectories listed as destination directories are created starting from the mount point and must be referenced in
       full.  For instance, in the previous example, if the user wanted to put some other subsets in a subdirectory of DIR,  the  entry  would	be
       dd=SUB/DIR/SUBSUBDIR.  Note that each new destination directory requires a product description.

       Product Description
	      This field is similar to the one defined under the magnetic tape description.  However, in the case of disk media there are 2 impor-
	      tant differences.  The product description is a required field, and all words in the description must be connected with  underscores
	      (_).  The script removes the underscores at run time.  For example, suppose the desired description was as follows:
	      This is a good product
	      The Product Description entry when making disk media would become:
	      This_is_a_good_product

       Directories
	      Same as for magnetic tape.

       instctrl
	      A directory containing the same information as INSTCTRL for magnetic tape.

       Subsets
	      Same as for magnetic tape.

Examples
       TK50 and MT9 (single-volume tape)kitcap description
       MYPRODUCT400 | MYPRODUCT software version 4:
	    :# directory listing :
	    /directory1:/directory2:/directory3:
	    SPACE:SPACE:SPACE:INSTCTRL:
	    :# subset listing :
	    subset1:subset2:subset3:subset4:subset5

       MT9 kitcap description (multi-volume tape)
       MYPRODUCT400 | MYPRODUCT software version 4:
	    /directory1:/directory2:/directory3:
	    SPACE:SPACE:SPACE:INSTCTRL:
	    subset1:subset2:subset3:subset4:subset5:
	    :# Volume 2 :
	    %%2:
	    subset6:subset7:subset8:subset9:subset10

       RA60 kitcap description (single product)
       MYPRODUCT400:c:
	    dd=/:MYPRODUCT_software_version_4:
	    /directory1:/directory2:/directory3:
	    instctrl:subset1:subset2:subset3:subset4:subset5

       RA60 kitcap description (multiple product)
       MYPRODUCT400:c:
	    dd=MYPRODUCT/BASE:
	    MYPRODUCT_software_version_4_base_subsets:
	    /directory1:/directory2:/directory3:
	    instctrl:subset1:subset2:subset3:subset4:subset5:
	    dd=MYPRODUCT/NONBASE:
	    MYPRODUCT_software_version_4_nonbase_subsets:
	    /directory1:/directory2:/directory3:
	    instctrl:subset1:subset2:subset3:subset4:subset5

See Also
       genra(8), gentapes(8)

																	 kitcap(5)
All times are GMT -4. The time now is 03:21 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy