Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Script for mkdir with permissions Post 302912583 by RudiC on Sunday 10th of August 2014 05:11:29 AM
Old 08-10-2014
Did you consider umask? And, do you know the -p option to mkdir?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell script permissions

Hi, I'm trying to execute a shell script from application (Informatica). The script works fine when I execute it from command line but fails when executed from Informatica. The tricky part is that there is other scripts in the same folder that can be executed succesfully from both command line... (1 Reply)
Discussion started by: tmikahan
1 Replies

2. Shell Programming and Scripting

Modify Perl script to work with txt - Permissions script

Hi I have this code, and i want work with a ls -shalR output in .txt What i need read to do this?? Where start? #!/usr/bin/perl # Allrights- A perl tool for making backups of file permissions # Copyright (C) 2005 Norbert Klein <norbert@acodedb.com> # This program is free... (1 Reply)
Discussion started by: joangopan
1 Replies

3. Shell Programming and Scripting

find jpg's mkdir script help

I am having a problem getting this to work right. The script needs to search through directories and subdirectories. If a jpg is found then create a folder in that directory, so on and so forth. Here is what I have so far but it doesn't work right. Help please #!/bin/bash for d in `find ./... (1 Reply)
Discussion started by: jedhypes
1 Replies

4. Shell Programming and Scripting

mkdir: copying a folder's permissions

Hi, I wanted to know how to create a folder using mkdir and then have it copy the permissions from another specified folder on the system. For example if I did this: mkdir /Volumes/USBSTICK/System How can I make it copy the permissions from the /System folder ? Thanks (4 Replies)
Discussion started by: pcwiz
4 Replies

5. Shell Programming and Scripting

Permissions script

Hi there, I've been having some frustrating problems with a permissions script. Basically I want it to to determine what permissions the owner, group and everybody has for the file passed in. Here's what I've got: #!bin/bash echo -n "Enter filename: " read file owner=$( ls -l $file | cut... (7 Replies)
Discussion started by: user_invalid
7 Replies

6. Shell Programming and Scripting

Script Permissions

I have a script were I issue the following command: perl -p -i -e "s/$v31a/$db2/" $dbn31 My script fails with permission error. However, at the command line I can edit the directory in question. I am using uname 002 in my script. So, why can i update manually but not in a script? (10 Replies)
Discussion started by: Harleyrci
10 Replies

7. Shell Programming and Scripting

Help on script to change permissions

Hi I have written the following script that later I want to put in cron,: #!/bin/bash _find="/usr/bin/find" _paths="/moneta_polled01/mediation_gsm /moneta_polled01/mediation_mmsc" for d in $_paths do $_find $d -type f -exec chmod 777 {} \; done but it does not seem to be... (8 Replies)
Discussion started by: fretagi
8 Replies

8. Shell Programming and Scripting

Bash script: "mkdir -p" doesn't work with var(cat x)

Hello, :) I've an issue with the creation of a directory, All work without it :mad: So, below, my scripts with the debug output : #!/bin/bash # PATHS HOME_BACKUP="/home/backup" HOME_SCRIPT="/home/scripts/test/backup_server" TARGET="/var/www" # DATE DATE_Ymd=$(date +%Y-%m-%d) #... (1 Reply)
Discussion started by: Arnaudh78
1 Replies

9. Shell Programming and Scripting

Use script to mkdir based on file's data

I have a file with lines like: 111 12 7 111 13 8 112 12 9 115 31 3 120 31 9 123 10 7 125 12 I want to make a script which, split the first column into parts (101-110, 111-120...), and make directories for its part with name (101-110, 111-120...) Also i want in every directory include... (7 Replies)
Discussion started by: efsarantis
7 Replies

10. Shell Programming and Scripting

Cd then mkdir from script

Importing images from a camera (or two). I sort by date (1901 this month). Currently (failing) if ] then echo "Found Panasonic G9X" #echo "List files on camera" #ls ${pana}/* . chxdir.sh ${photos}/$mn I want to change directory to a fixed base ($photos)/$mn... (10 Replies)
Discussion started by: dpawson
10 Replies
RFMKDIR(1)							Rfio User Commands							RFMKDIR(1)

NAME
rfmkdir - make remote directories SYNOPSIS
rfmkdir [ -m mode ] [ -p ] directory... DESCRIPTION
rfmkdir provides an interface to the shift remote file I/O daemon (rfiod) for creating remote directories in mode 777 (possibly altered by umask(1)). The directory argument is either a remote directory name of the form: hostname:path or a local directory name (not containing the :/ character combination). Creation of a directory requires write permission in the parent directory. OPTIONS
The following options apply to rfmkdir: -m mode This option allows users to specify the mode to be used for the new directories. Choices for modes can be found in chmod(1). -p With this option, rfmkdir creates dirname by creating all the non-existing parent directories first. SEE ALSO
mkdir(1), umask(1), mkdir(2), rfiod(1) AUTHOR
LCG Grid Deployment Team LCG
$Date: 2005/03/31 13:13:04 $ RFMKDIR(1)
All times are GMT -4. The time now is 03:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy