Sponsored Content
Top Forums Shell Programming and Scripting AWK help print dirs with files in it Post 302553784 by jim mcnamara on Thursday 8th of September 2011 04:20:57 PM
Old 09-08-2011
I'm not sure what out you want or what your requirements are. Kinda vague.

This does what you seem to want
Code:
find /filetransfer/dir*/outgoing -mmin +10 |
while read fname
do
     echo "Please check file in outgoing directory: $(dirname $(dirname $fname)) "
done > sort -u

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

I need to ls all files in 4-6 deep dirs

I need to print to file , a listing of all files below a certain directory. Example: I need to print to file a listing of all files below the etc dir (including the subdirectories) with their full path. Any ideas on how to do this with one command. Or is this something I need to do on all... (4 Replies)
Discussion started by: gforty
4 Replies

2. UNIX for Dummies Questions & Answers

Forcing UID on Files/Dirs Created with SFTP?

I have a situation where I have to provide Windows based users with access to specific files and directories on a *nix web mail server. The users cannot use the CLI, so SSH is out. They've previously used a product called Webdrive to access *nix boxes via SFTP. The files and dirs they need... (5 Replies)
Discussion started by: deckard
5 Replies

3. Shell Programming and Scripting

script find files in two dirs HELP

I have a directory which is /home/mark/files/ , inside this particular I have a bunch of filles (see examples below) TST_SHU_00014460_20090302.txt TST_SHU_00016047_20090302.txt TST_SHU_00007838_20090303.txt TST_SHU_00056485_20090303.txt TST_SHU_00014460_20090303.txt... (2 Replies)
Discussion started by: fierusbentus
2 Replies

4. Shell Programming and Scripting

Find most recent files in dirs and tar them up?

Hey all.. This should be simple but stoopid here can't get head around it! I have many directories, say 100 each with many files inside. I need a script to traverse through the dirs, find most recent file in each dir and add it to a tar file. I can find the files with something like for... (1 Reply)
Discussion started by: bobdung
1 Replies

5. Shell Programming and Scripting

Have absolute path for files in different dirs

Hi everybody. I need a command to print the absolute path of files which name starts always with a pattern (MOD03), independently on where they are in the filesystem. I have tryedls -ld ${INPUTPREFIX}/*/*/* | grep MOD03 | awk '{ print $8 }'but I have to use "/*/*/*" in this case to have the... (5 Replies)
Discussion started by: canduc17
5 Replies

6. UNIX Desktop Questions & Answers

limit number of sub-dirs searched for files

using: find . -type f -print|xargs -li "string", how do I limit the dated directories (2010-7-14, 2010-7-13,etc.) to just 2009 & 2010 years of directories to search. We go back to 2004 in our archives, way too many files. (3 Replies)
Discussion started by: MJThom713
3 Replies

7. Shell Programming and Scripting

sort retrieved data files in different dirs

Hi, I have a script to retrieve data files from server and store them in a directory on local disk. The script runs everyday as cron job. But now those files are too many so my boss wants me to put the files into different directories base on dates. Those files look like this: ... (4 Replies)
Discussion started by: leafei
4 Replies

8. Debian

Problem with files/dirs deletion

Hi, The other day i installed a PHP based CMS (modx) on my shell account and noticed that i couldn't delete any of files/dirs it created after. Also, i noticed that all that stuff is owned by username-www instead of username. I tried chown, chmod and using a PHP script to do the same wti... (4 Replies)
Discussion started by: pentago
4 Replies

9. Shell Programming and Scripting

Moving files into dirs corresponding to dates

I am trying to find a way to move files into corresponding date files. i=0 while read line do array="$line" (( i++ )) done < <(ls) cd $(echo ${array}) echo ${array}} pwd #cd "$(array}" ] || mkdir 2015 cd "2015" ] || mkdir 02-February ] || mkdir 03-March ] || mkdir... (10 Replies)
Discussion started by: newbie2010
10 Replies

10. Shell Programming and Scripting

Replace a string in files in all dir and sub dirs

Hello, I need to replace xml version='1.1' with xml version='1.0' in all xml files under /app/jenkins/ in all dir and sub dirs in my CentOS VM, I tried below command but it didn't help, looks like I'm missing a character somewhere. grep -rl "xml version='1.1'" . | xargs sed -i 's/"xml... (2 Replies)
Discussion started by: mahesh Madpathi
2 Replies
AnyData::Storage::File(3pm)				User Contributed Perl Documentation			       AnyData::Storage::File(3pm)

NAME
AnyData::Storage::File -- manipulate files with rich warnings DESCRIPTION
Opens, reads from, writes to, creates and destroys files with numerous options for error handling, flocking, binmode, etc. The simplest form is the equivalent of my $f = AnyData::Storage::File->new(dirs=>@dirs,flock=>1); my $str1 = $f->adSlurp($file); for( @dirs ) { open(IN,$file) or die $!; } sub slurp { local *IN; local $/ = undef; } But, depending on how you set the default behaviour SYNOPSIS
use AnyData; my $f = AnyData::Storage::File->new; $f->set('binmode',1|0); $f->set('PrintError',1|0); $f->set('RaiseError',1|0); $f->set('Trace',1|0); $f->set('f_dir',$dir|$dir_array) < input, fail if doesn't exist > output, truncate if exists, create if doesn't >> append, create if doesn't exist +< read/write, fail if doesn't exist r = < r+ = new() my $f = AnyData::Storage::File->new; or my $f = AnyData::Storage::File->new( %flags ); %flags is a hash which can contain any or all of: f_dir => $directory, # defaults to './' ( binmode => $binmode, # defaults to 0 (doesn't binmode files) printError => $warnings, # defaults to 1 (print warning on errors) open_local_file( $fname, $mode ); Mode is one of a = append open for reading & writing, create if doesn't exist r = read open for reading, fail if doesn't exist u = open open for reading & writing, fail if doesn't exist c = create open for reading & writing, fail if it already exists o = overwrite open for reading & writing, overwrite if it already exists Additionally, all modes fail if the file can't be opened. On systems that support flock, 'r' fails if a shared lock can not be obtained; the other modes fail if an exclusive lock can't be obtained. perl v5.10.1 2004-08-17 AnyData::Storage::File(3pm)
All times are GMT -4. The time now is 03:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy