Tuesday, March 9, 2021

Shell script to move files older than 10 days

A small script to move file from one directory to another.

step1: Create a file with name file_move.sh

    for i in $(find  absolute_path_from_move -type f -name "*"  -mtime +10 2> /dev/null);

    do

    mv $i archive_path;

    done

step2: execute with Command 

    sh -x file_move.sh

No comments:

Post a Comment

Featured Post

OIC - how can I use XSLT functions to remove leading zeros from numeric and alphanumeric fields?

To remove leading zeros from an numeric field in Oracle Integration Cloud (OIC) using XSLT, you can Use number() Function The number() funct...