Sponsored Content
Full Discussion: Creating Directory
Top Forums Shell Programming and Scripting Creating Directory Post 302422005 by pseudocoder on Monday 17th of May 2010 08:59:18 AM
Old 05-17-2010
May I improve this? Smilie

Quote:
Originally Posted by namishtiwari
Code:
dir="/home/somedirectory"
if [ -d $dir ];
then
echo "The directory $dir exists"
cd $dir
cp pathoffiletocopy .
else 
mkdir -p $dir
cd $dir
cp pathoffiletocopy .
fi

I also did not test it, but I noticed this two things at first sight Smilie
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

creating directory error

i have create a Directory with "$@#$%" . After creating a Directory, put ls command display "#$%" . Why? (2 Replies)
Discussion started by: lakshmananindia
2 Replies

2. 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

3. Shell Programming and Scripting

creating a directory tree

Hi all, I'd like to create a directory tree, and define from stdin how many levels deep and how many directories in each level should be created. What I wrote does not work properly:#!/bin/bash #set -x read -p " What root directory? " rootDir && { /bin/rm -R $rootDir; mkdir $rootDir; } ||... (2 Replies)
Discussion started by: NBaH
2 Replies

4. Homework & Coursework Questions

Creating directories within a directory?

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

5. UNIX for Dummies Questions & Answers

Need help in creating directory

Hello Experts let say we got a line a file named /user/Oracle/my_catalog/default/root/webcat+backup+testing+07192011.atr now i have to create a directory with name webcat backup testing 07192011 by removing + and removing .atr at the given path...can it be possible Please let me know... (4 Replies)
Discussion started by: aks_1902
4 Replies

6. UNIX for Dummies Questions & Answers

Error while creating directory

Hello Experts while read dirlist do mkdir "$(echo "$dirlist" |\ awk -F\| '{gsub(/(+)/," ",$NF);gsub(/\.atr$/,""); print}')" done < /user/Oracle/my_catalog/default/root/bkup/dirnames.txt where dirname.txt consist of file path details as mentioned below ... (4 Replies)
Discussion started by: aks_1902
4 Replies

7. UNIX for Dummies Questions & Answers

creating directory in unix

Hi, If i create a directory like with the command ... ~/.ssh so where this folder will be get created in side my home directory ...? what (~) represents here..?:confused: (4 Replies)
Discussion started by: rahul125
4 Replies

8. UNIX for Dummies Questions & Answers

Creating directory with specific size?

Hello world, I just learnt we can create a directory with custom size in a Linux server (say Redhat). Is it true? I'm asking because the only data (I can think of) a directory's inode holds is the files and 'sub-dir's. How can a new empty directory be of some required size? :wall: PS : In... (2 Replies)
Discussion started by: satish51392111
2 Replies

9. Shell Programming and Scripting

creating directory from scripts

Dear All, I have a shell scripts which create a directory and perform moving some files, when the script is kept where it is creating directory then it runs fine , but when the scripts is run where it is supposed to be which is different location then where i am creating directory , scripts... (2 Replies)
Discussion started by: guddu_12
2 Replies

10. UNIX for Dummies Questions & Answers

creating file and it directory

hello, is there any command that i can use to create a file and also it directory (if not exist)? example: <command> /home/admin/testdir/test1.txt desc: this will create test1.txt under testdir directory. but if testdir is not exist it will be created automatically. thank you... (3 Replies)
Discussion started by: makan
3 Replies
GLOBUS-UPDATE-CERT(8)					      GSI-C OpenSSL Commands					     GLOBUS-UPDATE-CERT(8)

NAME
globus-update-certificate-dir - Update symlinks in the trusted CA directory SYNOPSIS
globus-update-certificate-dir [-help] [-d DIRECTORY] DESCRIPTION
The globus-update-certificate-dir program creates symlinks between files (CA certificates, certificate revocation lists, signing policy, and certificate request configuration files) using the certificate hash the installed version of OpenSSL uses. OpenSSL 1.0.0 uses a different name hashing algorithm than previous versions, so CA distributions created with older versions of OpenSSL might not be able to locate trusted CAs and related files. Running globus-update-certificate-dir against a trusted CA directory will add symlinks to the files to the hash if needed. The full set of command-line options to globus-update-certificate-dir consists of: -help Display a help message to standard output and exit -d DIRECTORY Create links in the trusted CA directory DIRECTORY instead of using the default search path. ENVIRONMENT
If the following variables affect the execution of globus-update-certificate-dir X509_CERT_DIR Default trusted certificate directory. HOME Path to the current user's home directory. GLOBUS_LOCATION Path to the Globus installation. University of Chicago 02/18/2010 GLOBUS-UPDATE-CERT(8)
All times are GMT -4. The time now is 06:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy