![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Create Year directory, date subdirectory and archive the file | madhunk | UNIX for Dummies Questions & Answers | 2 | 12-13-2007 11:25 AM |
| parsing a system log file via the 'date' command | cjones | Shell Programming and Scripting | 5 | 05-10-2007 12:26 PM |
| How to create a new file system | tintedwindow | UNIX for Dummies Questions & Answers | 3 | 04-17-2007 09:27 PM |
| create a new file system | rongrout | SCO | 2 | 09-22-2004 09:13 PM |
| file date vs. system date | ober5861 | UNIX for Dummies Questions & Answers | 8 | 09-11-2001 02:36 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
need to create a file with its name having system date
Hi,
Iam new to unix . I need to write a scritp which can create a file having sysdate as a part of it.and i also need to delete file which is created five days before in a directory.pls Help me out thanks in advance |
|
||||
|
/usr/bin/find "Directory Path" -type f -mtime +5 -exec /bin/rm -f {};
Ex: /usr/bin/find /home/justsam -type f -mtime +5 -exec /bin/rm -f {}; Note: The above deletes only the files (mentioned by the type switch) in the directory /home/justsam wich are older than 5 days (mentioned by -mtime). If you want to delete files older than 3 days, make it -mtime +3 Last edited by justsam; 10-17-2006 at 07:32 AM.. Reason: Changing the path |
![]() |
| Bookmarks |
| Tags |
| mtime |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|