Sponsored Content
Top Forums Shell Programming and Scripting Delete files from sub-directories over 7 days Post 302265055 by sureshcisco on Friday 5th of December 2008 12:55:57 PM
Old 12-05-2008
Delete files from sub-directories over 7 days

Can any one please help me in deleting all the Files over 7 days from sub-directories A, B, C...

Top-Directory
Sub-Directory-A
File-1
File-2
.....
File-n
Sub-Directory-B
File-1
File-2
.....
File-n
Sub-Directory-C
File-1
File-2
.....
File-n
Sub-Directory-Z
----
----
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to delete files which are 7 days old

Hi all, how to write a script that will indentify the files in a directory which are 7 days old and delete those files. Thanks in advance Cheers Arunava (8 Replies)
Discussion started by: arunava_maity
8 Replies

2. UNIX for Dummies Questions & Answers

How to delete files over 30 days

I have a directory that contains files. I would like the command that deletes all files that are over 30 days old. Delete files based on creation date and not modified. (2 Replies)
Discussion started by: GEBRAUN
2 Replies

3. Shell Programming and Scripting

Need to remove files older than 30 days except directories

Hi, I need to remove files (*.trc) which are older than 30 days from one location. My problem is there I do not want to visit any of the directories at that location. I want to search files at that particular location only (need to skip directorys at that location). maxdepth option is there... (6 Replies)
Discussion started by: malaymaru
6 Replies

4. HP-UX

Command for delete the directories which are older than 7 days

Hi, My requirement is need to delete the directories (Including files also) which are older than 7 days. So I used below command in one script (script takes 2 input parameters) #$1 - Path of the directory from where we have to delete the directories.# #$2 - Number of days older... (1 Reply)
Discussion started by: sridhar sivakot
1 Replies

5. UNIX for Dummies Questions & Answers

Delete files older than 30 days

This is driving me crazy. How can I delete files in a specifc directory that are over 30 days old? Thanks in advance. (3 Replies)
Discussion started by: tlphillips
3 Replies

6. Red Hat

Find files older than 30 days in directories and delete them

Hi, I have dummies questions: My script here can find the files in any directories older than 30 days then it will delete the files but not the directories. I would like to also be able to delete the directories that hold old files more than 30 days not just the files itself. find . -type f... (2 Replies)
Discussion started by: lamoul
2 Replies

7. Shell Programming and Scripting

Using cron to delete directories 90 days old

We use Solaris 10 x86 and I want to use a cron job to remove directories +90 old. Currently I have the command below but it only cleans the files and keeps the directory. What am I doing wrong? /opt/tesk/batch/kit/archive/* -mtime +90 -exec rm -r {} \: Thank you (3 Replies)
Discussion started by: oh-daa
3 Replies

8. Shell Programming and Scripting

Find directories only and delete them created 3 days before

Hello I have some directories and files created under /export/local/user I would like to delete directories only under /export/local/user, created before 3 days Can someone help me with command to do this task? Thanks (4 Replies)
Discussion started by: needyourhelp10
4 Replies

9. Shell Programming and Scripting

Need Help in ksh Script to list files older than 365 days from specified directories

Requirement is to list the files older than 365 days from multiple directories and delete them and log the list of files which are deleted to a log file. so 1 script should only list files older than 365 days for each directory separately to a folder The other script should read these files... (7 Replies)
Discussion started by: prasadn
7 Replies

10. Shell Programming and Scripting

Delete files 30 days old

Will this work to delete files 30 days old in $backupDir or is there a better way to do it? find $backupDir -type f -mtime +30 -exec rm {} \; (2 Replies)
Discussion started by: wyclef
2 Replies
dxfileshare(8)						      System Manager's Manual						    dxfileshare(8)

NAME
dxfileshare - Exports local directories and mounts directories from the network SYNOPSIS
/usr/bin/X11/dxfileshare DESCRIPTION
Use the File Sharing application, dxfileshare, to: Export (or share) local UNIX directories to the network Stop exporting UNIX local direc- tories to the network Specify which directories mounted from the network are to be remounted every time the system is rebooted, that is, add an entry to the /etc/fstab file Add, change, or delete NFS entries from the /etc/exports file Share local UNIX directories with a per- sonal computer (PC) when Advanced Server for UNIX is installed on your system Display local directories that are shared (exported) with the network Display network mounts (directories that can be mounted from the network) The File Sharing application can also be invoked from the CDE Application Manager from the following categories: Application Group: System_Admin System Admin Subgroup: Daily Admin Online help is available for the File Sharing application by clicking on any Help button or using the Help pull-down menu. RESTRICTIONS
You must have root privileges to use certain features of File Sharing. Namely, the ability to export (or share) a directory or to modify the properties of a directory that is already being exported. You must have Advanced Server for UNIX installed on your system to share local directories with PCs. FILES
Defaults that are shared by the graphical and command line user interface. File Sharing uses the same file as the Host Manager application. File Sharing application File Sharing help volume Directory containing File Sharing application icons Application defaults file that sets the default values for the X resources File Sharing message catalog Message catalog containing File Sharing location IDs for on-item help i18n_motif_shared_text.cat Message catalog containing application-independent messages i18n_motif_shared_text_LocIds.cat Message catalog containing application-independent location IDs for on-item help SEE ALSO
Commands: X(1X), automount(8), bcheckrc(8), mount(8), mountd(8), showmount(8), umount(8) Functions: getfsstat(2), getmntinfo(3), getmntinfo_r(3), mount(2), mount(2sv), umount(2), umount(2sv), umount(3) Files: exports(4), fstab(4), mountdtab(4) Tru64 UNIX System Administration ASU Installation and Administration Guide ASU Concepts and Planning Guide dxfileshare(8)
All times are GMT -4. The time now is 10:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy