Sponsored Content
Top Forums Shell Programming and Scripting A Batch job to delete files from various directories Post 302193307 by andryk on Friday 9th of May 2008 03:17:02 AM
Old 05-09-2008
Hi,
Here's a idea, wrapper.sh
Code:
while read dir age
do
        echo Cleaning $dir +$age ...
        my_file_remover.sh $dir $age
done < /path/to/oneconfig/file

Put wrapper.sh in cron and you're done. Smilie
 

10 More Discussions You Might Find Interesting

1. Windows & DOS: Issues & Discussions

Schedule a Batch file to delete files at particular intervals

Hi, I need to write a batch file/shell script that runs at specified intervals daily and deletes specified set of files. Can anyone pls help me with the code. Thanks, Indom. (6 Replies)
Discussion started by: Indom
6 Replies

2. UNIX for Dummies Questions & Answers

batch delete using find, files with # character

UPDATE: Sorry, disregard this. It did work, I made a mistake; I just shouldn't have been using maxdepth. I do think it is good to know, however, that find | grep '#' | xargs rm will "clean up" funnily named files in a directory. Of course, some of those funnily named files are there... (0 Replies)
Discussion started by: tphyahoo
0 Replies

3. UNIX for Dummies Questions & Answers

delete pattern files in sub directories

Hello friends, I am compiling some set of SQL scripts in a set of sub directories demoed as below. After compiling log files are being created. Each and every time after compiling time I had to go subdir by subdir to delete the log files. I am sure there should be simple way to look for all log... (4 Replies)
Discussion started by: adurga
4 Replies

4. Shell Programming and Scripting

Batch delete specific folder from user home directories

Hi! Need your help. How can I delete the cache folder of multiple user home directories via automatically executed shell script on a Mac OS X Server? Example: The userdata are stored on a Xsan Volume like this: /Volumes/Xsan/userdata/mike /Volumes/Xsan/userdata/peter... (2 Replies)
Discussion started by: nipodrom
2 Replies

5. UNIX for Dummies Questions & Answers

Batch Renaming: Change files' extensions in many sub-directories

Hi all - I'm trying to rename a large number of files all at once and need some help figuring out the command line syntax to do it. I've already done quite a bit of research with the rename and mv commands, but so far haven't found a solution that seems to work for me. So: The files exist... (10 Replies)
Discussion started by: dave920
10 Replies

6. UNIX for Dummies Questions & Answers

Cron job to delete files

Hi everyone! I'm sorry, I'm a total noob but would really appreciate any advice or help. I want to create a cron job that would run every hour and would look inside a few different folders. If any new files were created within those folders within the last hour they would be destroyed, but any... (2 Replies)
Discussion started by: jessn
2 Replies

7. OS X (Apple)

Batch file to move video files and retain sub-directories

I have just purchased my first ever Apple computer - and am therefore new to UNIX also. I would like to create a simple "batch file" (apologies if this is the wrong terminology) to do the following: When I plug my camera into the MAC it automatically downloads photos and videos into a new... (1 Reply)
Discussion started by: mm0mss
1 Replies

8. Shell Programming and Scripting

Executing a batch of files within a shell script with option to refire the individual files in batch

Hello everyone. I am new to shell scripting and i am required to create a shell script, the purpose of which i will explain below. I am on a solaris server btw. Before delving into the requirements, i will give youse an overview of what is currently in place and its purpose. ... (2 Replies)
Discussion started by: goddevil
2 Replies

9. Shell Programming and Scripting

Delete files in group of directories

OS: SUNOS 5.10 i386 Hello guys I wrote a shell script in bash shell to delete the files less than 30 days old. The following is the script. ======================================= #!/bin/bash for dirs in `/clu04/oracle/directory_list.lst` do find $dirs -type f -mtime -30 -exec rm {} \;... (3 Replies)
Discussion started by: zacsparrow
3 Replies

10. Shell Programming and Scripting

How to delete directories and files with xargs?

Hello, i have an dynamical apache_cache that I need to clean all days (older tant one day) with an unix command : find /usr/IBM/HTTPServer/apache_cache/ -name '*' -mtime +1 -print0|xargs -0 rm -r -- but it didn't work. Could you explain me why. So I will put below all my script :... (13 Replies)
Discussion started by: steiner
13 Replies
OCAMLMKLIB(1)						      General Commands Manual						     OCAMLMKLIB(1)

NAME
ocamlmklib - generate libraries with mixed C / Caml code. SYNOPSIS
ocalmklib [options] files DESCRIPTION
The ocamlmklib command facilitates the construction of libraries containing both Caml code and C code, and usable both in static linking and dynamic linking modes. OPTIONS
-h, --help Show summary of options. -cclib lib C library passed to ocamlc -a or ocamlopt(1) -a only. -ccopt opt C option passed to ocamlc(1) -a or ocamlopt(1) -a only. -custom Disable dynamic loading. -dllpath dir Add dir to the run-time search path for DLLs. -I dir Add dir to the path searched for Caml object files. -failsafe Fall back to static linking if DLL construction failed. -ldopt opt C option passed to the shared linker only. -linkall Build Caml archive with link-all behavior. -llib Specify a dependent C library. -Ldir Add dir to the path searched for C libraries. -ocamlc cmd Use cmd in place of ocamlc(1). -ocamlopt cmd Use cmd in place of ocamlopt(1). -o name Generated Caml library is named name.cma or name.cmxa. -oc name Generated C library is named dllname.so or libname.a. -rpath dir Same as -dllpath dir. -Rdir Same as -rpath. -verbose Print commands before executing them. -Wl, -rpath dir Same as -dllpath dir. -Wl, -rpath -Wl dir Same as -dllpath dir. -Wl, -Rdir Same as -dllpath dir. -Fdir Specify a framework directory (MacOSX). -framework name Use framework name (MacOSX). SEE ALSO
ocamlc(1), ocamlopt(1). AUTHOR
This manual page was written by Samuel Mimram <samuel.mimram@ens-lyon.org>, for the Debian project (but may be used by others). August 19, 2004 OCAMLMKLIB(1)
All times are GMT -4. The time now is 12:00 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy