Sponsored Content
Top Forums Shell Programming and Scripting Remove files which created date before 10 days on HP-UX Post 302270321 by jim mcnamara on Sunday 21st of December 2008 05:05:12 AM
Old 12-21-2008
Code:
find /path/to/files -name '*' -type f -mtime +10 -exec rm -f {} \;

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Deleting files created before two days ago

Dear All: I want to build a shell that delete files created two or more days ago ... I think it could be built using a special command with ls or grep, I'd apreciate any help from you guys I have a lot of log files from november, december, january and this tool will help me a lot The files... (3 Replies)
Discussion started by: josecollantes
3 Replies

2. Shell Programming and Scripting

List files created before Noon 2 days prior

Our nightly updates run in the evening and finish around 8am. My boss wants the current log files kept on the server for 2 days, but wants anything created before noon, 2 days prior archived. I was thinking of using touch to set a temporary file with a date of today-2 and a time of noon, then... (3 Replies)
Discussion started by: prismtx
3 Replies

3. UNIX for Dummies Questions & Answers

Display files created on particular date

hi , i am trying to display the files created on a particular date. I have tried using find .-mtime +n but these files are created on november 6th 2007 , so i'm not sure of what the 'n' value should be. And the number of files created on that particular day are more than 5000 so i have to make a... (6 Replies)
Discussion started by: amit_kv1983
6 Replies

4. Shell Programming and Scripting

How can i remove the files generated on 10 days before!!!

Dear Friends! i am wirking on the IBM AIX version 5.3. and i wrote a script to delete the files whicha re generated on 10 days before to the present day. but iam not able to delete the files with the below script so please check and correct me. dt=`TZ=aaa480 date +%d`... (2 Replies)
Discussion started by: innamuri.ravi
2 Replies

5. UNIX for Dummies Questions & Answers

How to find files created some days before?

HI, I have 2 questions. 1> Is there any code to see files that created some day or some time before in a directory??? 2> how or where i will find the last exit status of a process?? thanks (6 Replies)
Discussion started by: jyotidas
6 Replies

6. Shell Programming and Scripting

print out date of files last created??

Hello everyone, I have this script here: use Time::Local; opendir (D, $ARGV) or die "Cant open"; foreach $file (readdir D) { $path = "$ARGV/$file"; next if ! -T $path; $last_mod = (stat $path); ($sec,$min,$hour,$mday,$mon,$year,$wday) = localtime ($last_mod); printf "%-15s:... (4 Replies)
Discussion started by: new bie
4 Replies

7. Shell Programming and Scripting

Showing files that were created at a certain Date

Guys i am having a bit of a trouble finding the creation date of a file. What i have to do is to redirect the output of a command (which i believed was ls -l but this command shows only the Modification time) into a file, which will contain all the files that were created on a certain date, for... (2 Replies)
Discussion started by: jimas13
2 Replies

8. Shell Programming and Scripting

Script to remove folders by date created

Hi All I require to generate a script that deletes folders and sub directoires from a set period after creation. So have folder X on a daily basis i have job folders being created folder name 1234568. What i need to do is keep this folder pruned. So say 7 days after creation of the job folder its... (4 Replies)
Discussion started by: treds
4 Replies

9. Shell Programming and Scripting

Find the sum of files created 5 days before

Hi, I want to find the sum of all the files created 5 days ago and store it in a variable. (os is HP-UX) can this be extracted from ls -l Is there any other way of getting the sum of all the files created (4 Replies)
Discussion started by: bang_dba
4 Replies

10. UNIX for Dummies Questions & Answers

Find the count of files by last created date based on the given date range

My unix version is IBM AIX Version 6.1 I tried google my requirement and found the below answer, find . -newermt “2012-06-15 08:13" ! -newermt “2012-06-15 18:20" But newer command is not working in AIX version 6.1 unix I have given my requirement below: Input: atr files: ... (1 Reply)
Discussion started by: yuvaa27
1 Replies
libssh2_scp_send_ex(3)						  libssh2 manual					    libssh2_scp_send_ex(3)

NAME
libssh2_scp_send_ex - Send a file via SCP SYNOPSIS
#include <libssh2.h> LIBSSH2_CHANNEL * libssh2_scp_send_ex(LIBSSH2_SESSION *session, const char *path, int mode, size_t size, long mtime, long atime); DESCRIPTION
This function has been deemed deprecated since libssh2 1.2.6. See libssh2_scp_send64(3). session - Session instance as returned by libssh2_session_init_ex(3) path - Full path and filename of file to transfer to. That is the remote file name. mode - File access mode to create file with size - Size of file being transmitted (Must be known ahead of time precisely) mtime - mtime to assign to file being created atime - atime to assign to file being created (Set this and mtime to zero to instruct remote host to use current time). Send a file to the remote host via SCP. RETURN VALUE
Pointer to a newly allocated LIBSSH2_CHANNEL instance, or NULL on errors. ERRORS
LIBSSH2_ERROR_ALLOC - An internal memory allocation call failed. LIBSSH2_ERROR_SOCKET_SEND - Unable to send data on socket. LIBSSH2_ERROR_SCP_PROTOCOL - LIBSSH2_ERROR_EAGAIN - Marked for non-blocking I/O but the call would block. AVAILABILITY
This function was marked deprecated in libssh2 1.2.6 as libssh2_scp_send64(3) has been introduced to replace this function. SEE ALSO
libssh2_channel_open_ex(3) libssh2 0.15 1 Jun 2007 libssh2_scp_send_ex(3)
All times are GMT -4. The time now is 03:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy