Sponsored Content
Operating Systems Solaris Running a script in a sub dir with space in it Post 302917368 by Ditto on Tuesday 16th of September 2014 10:01:11 AM
Old 09-16-2014
Not sure I like the sight of wild cards in something like that .. Smilie

what if the folder:

Task_old_Logs1

gets created?

I tested on my system (Solaris) - and this works - any reason why you just don't wrap the whole thing in double quotes ?? [edit] or is that not something cron likes ?? [\edit]

Code:
 
>  /usr/ditto/work/temp/temp > ls -ltr
total 0
drwxr-x---   2 ditto    xxxx         96 Sep 16 09:57 test folder
>  /usr/ditto/work/temp/temp > ls -ltr test*
total 2
-rw-r-----   1 ditto    xxxx         16 Sep 16 09:57 test.sh
>  /usr/ditto/work/temp/temp > more test*/*
echo "It ran!"
>  /usr/ditto/work/temp/temp > ksh "./test folder/test.sh"
It ran!
>  /usr/ditto/work/temp/temp > ksh ./"test folder"/test.sh
It ran!
>  /usr/ditto/work/temp/temp >

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

script to go to a different dir to run a commandline prompt in that dir

Hi, I need to know how I'll be able to write a script that can goto a different dir where I don't have access to read,write and execute and also to run a commandline prompt in that dir with one file whose path has to be specified in that command. Will I be able to do this? Any ideas or... (2 Replies)
Discussion started by: ann_124
2 Replies

2. Shell Programming and Scripting

a script to clone a dir tree, & overwrite the dir struct elsewhere?

hi all, i'm looking for a bash or tcsh script that will clone an empty dir tree 'over' another tree ... specifically, i'd like to: (1) specify a src directory (2) list the directory tree/hiearchy beneath that src dir, w/o files -- just the dirs (3) clone that same, empty dir hierarchy to... (2 Replies)
Discussion started by: OpenMacNews
2 Replies

3. Shell Programming and Scripting

sftp how to deal with space in path to dir?

OK I am trying to use something similar to this: #!/bin/sh echo "OK, starting now..." sftp -b /dev/fd/0 user@remotehost <<EOF cd pub ascii put filename.txt bye EOF only difference is the dir I need to cd to has a space in it like this /Import/Server/Prospect File ,... (3 Replies)
Discussion started by: NewSolarisAdmin
3 Replies

4. Shell Programming and Scripting

A script to find dir, delete files in, and then del dir?

Hello!! I have directories from 2008, with files in them. I want to create a script that will find the directoried from 2008 (example directory: drwxr-xr-x 2 isplan users 1024 Nov 21 2008 FILES_112108), delete the files within those directories and then delete the directories... (3 Replies)
Discussion started by: bigben1220
3 Replies

5. Shell Programming and Scripting

Need a script to move the files from one dir to other other dir

Need a script to move the files from one dir to other dir and at the same time it has to read the log in the source dir. Please help me ASAP. (4 Replies)
Discussion started by: viswanathkishor
4 Replies

6. AIX

Running out of space

AIX 6.1 Of course, right at the end of the day I see that my "/" file system is just about out of space. I've been googling and reading man pages, but my google-fu is weak today. How do I find out what is taking all the space? I think I found the process that is cause *some* file to grow but I... (15 Replies)
Discussion started by: Spellbound
15 Replies

7. Emergency UNIX and Linux Support

Command to calculate space for all subdirs under a dir

du -hs command calculates the space for all the subdirs under a dir ...but it is very slow if the dir is huge....is there any quick way ...I am using Sun OS. Thanks, Ajay (19 Replies)
Discussion started by: ajaypatil_am
19 Replies

8. Shell Programming and Scripting

Script to move all files in a dir into a certain dir

Hello all, I'm very new to shell scripting and need quite urgently to do this thing for my student job. I have a directory called "vectors" with a bunch of files all named ".vector". also i have for each of those files a directory with the name . I now want to move each of those *.vector files... (2 Replies)
Discussion started by: sherresh
2 Replies

9. Solaris

Disk space being used up while running a script

We have a script which when run consumes the space of the disk from where it is being run. we have to kill this script every time to release space. why do this happen ? any work around please we are using solaris 10 P.S. : a part of the code will make some connection to the DB (1 Reply)
Discussion started by: chidori
1 Replies

10. UNIX for Dummies Questions & Answers

Cannot cd to dir with space

I have a script that I am trying to use. I need it to run from a certain directory. I have tried the following: SCRIPT_DIR=$PWD MYDIR="/filemount/files/Move Files" cd "$MYDIR" $SCRIPT_DIR/movefiles.bash I have tried to run it. but I always get "no such file or directory" from the script... (5 Replies)
Discussion started by: newbie2010
5 Replies
device_allocate(4)                                                 File Formats                                                 device_allocate(4)

NAME
device_allocate - device_allocate file SYNOPSIS
/etc/security/device_allocate DESCRIPTION
The device_allocate file contains mandatory access control information about each physical device. Each device is represented by a one line entry of the form: device-name;device-type;reserved;reserved;auths;device-exec where device-name This is an arbitrary ASCII string naming the physical device. This field contains no embedded white space or non- printable characters. device-type This is an arbitrary ASCII string naming the generic device type. This field identifies and groups together devices of like type. This field contains no embedded white space or non-printable characters. reserved This field is reserved for future use. reserved This field is reserved for future use. auths This field contains a comma-separated list of authorizations required to allocate the device, or asterisk (*) to indicate that the device is not allocatable, or an '@' symbol to indicate that no explicit authorization is needed to allocate the device. The default authorization is solaris.device.allocate. See auths(1) device-exec This is the physical device's data purge program to be run any time the device is acted on by allocate(1). This is to ensure that all usable data is purged from the physical device before it is reused. This field contains the filename of a program in /etc/security/lib or the full pathname of a cleanup script provided by the system adminis- trator. The device_allocate file is an ASCII file that resides in the /etc/security directory. Lines in device_allocate can end with a `' to continue an entry on the next line. Comments may also be included. A `#' makes a comment of all further text until the next NEWLINE not immediately preceded by a `'. White space is allowed in any field. The device_allocate file must be created by the system administrator before device allocation is enabled. The device_allocate file is owned by root, with a group of sys, and a mode of 0644. EXAMPLES
Example 1: Declaring an allocatable device Declare that physical device st0 is a type st. st is allocatable, and the script used to clean the device after running deallocate(1) is named /etc/security/lib/st_clean. # scsi tape st0; st; reserved; reserved; solaris.device.allocate; /etc/security/lib/st_clean Example 2: Declaring an allocatable device with authorizations Declare that physical device fd0 is of type fd. fd is allocatable by users with the solaris.device.allocate authorization, and the script used to clean the device after running deallocate(1) is named /etc/security/lib/fd_clean. # floppy drive fd0; fd; reserved; reserved; solaris.device.allocate; /etc/security/lib/fd_clean Notice that making a device allocatable means that you need to allocate and deallocate it to use it (with allocate(1) and deallocate(1)). If a device is not allocatable, there will be an asterisk (*) in the auths field, and no one can use the device. FILES
/etc/security/device_allocate Contains list of allocatable devices SEE ALSO
auths(1), allocate(1), bsmconv(1M), deallocate(1), list_devices(1), auth_attr(4) NOTES
The functionality described in this man page is available only if the Basic Security Module (BSM) has been enabled. See bsmconv(1M) for more information. SunOS 5.10 17 Mar 2003 device_allocate(4)
All times are GMT -4. The time now is 03:09 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy