Hi.
I need help with a little script that will be used to move some files to their parent directory, delete the directory, rename one file in the parent directory and delete another, then continue to the next.
Here's an example:
/var/media/Music/Genesis/1970 album - Trespass (2008 Box -... (4 Replies)
Hi Gurus
I'm using HPUX B.11.23 ia64, the below sample log data was extracted from HPUX commnad: last -R.
Sample data:
root pts/ta userpc Wed Aug 11 09:46 - 20:21 (10:35)
root pts/ta userpc Wed Aug 11 09:44 - 20:10 (10:34)
root pts/ta userpc Wed Aug 11... (4 Replies)
Hi Experts,
I want to write a script, based upon the following requirement
1) I am having 5 application
$ cd logs
$ ls -l
drwxr-xr-x 2 natraj nat 5.0K Sep 20 10:25 one
drwxr-xr-x 2 natraj nat 5.0K Sep 20 10:39 two
drwxr-xr-x 2 natraj nat 1.5K Sep 20 10:58... (4 Replies)
Hi All,
I want to move the files in to different folders based on the files month in the file timestamp.
For example
All the september files in the directory should moves into the folder "sep_bkp_files" , August files in to aug_bkp_files folder...
Please help me to achive the above... (10 Replies)
Hi,
I need a script that moves files based on date to a folder. The folder should be created based on file date. Example is :
Date file name
----- --------
Oct 08 07:39 10112012_073952.xls
Oct 09 07:39 10112012_073952.xls
Oct 10 07:39 ... (6 Replies)
Hi All
I have a requirement like below.I have always 12 files got generated in my directory called /xx/out/
abc_2014_10_121.xml
abc_2014_09_345.xml
abc_2014_08_432.xml
abc_2014_07_123.xml
abc_2014_06_098.xml
abc_2014_05_569.xml
abc_2014_04_430.xml
abc_2014_03_235.xml
abc_2014_02_056.xml... (9 Replies)
Hi ,
I need a script which moves files based on month. Example :
Apr 29 03:16 log4.txt
Apr 29 03:16 log5.txt
May 4 09:17 log1.txt
May 4 09:17 log2.txt
Move Apr files into Apr2015(Folder)
Move May files into May2015(Folder).
This is urgent requirement , if you can help me... (5 Replies)
Hey guys,
ive been working on this for about 2hrs now - without any solution.
At first I need to say I dont have skills in linux bash scripting, but I tried to use some codesnippets and manuals from google.
What I want to do:
I have different folders including 2 different filestypes with... (15 Replies)
could you please assist the below query.
i had written the below piece of code to copy the files from one directory to another. For current month files had been copied ,unfortunately the previous month files not copied.
Please find the below directory structure:-
ls -lrt
total 1824... (2 Replies)
Discussion started by: venkat918
2 Replies
LEARN ABOUT CENTOS
crontabs
CRONTABS(4) Crontabs users' Manual CRONTABS(4)NAME
crontabs - configuration and scripts for running periodical jobs
SYNOPSIS
run-parts [--list|--test]<directory>
DESCRIPTION
Crontabs is a historical name for the run-parts script and the system crontab. The run-parts script runs all executables in the specified
directory. Run-parts runs all executables in the specified directory. The execution of files can be allowed or denied by creating file
jobs.allow or jobs.deny which worked similar as other allow/deny config files. The file must be created in the specified directory.
--list print names of all files (not limited to executables), but don't run them. This option can't be used with test option.
--test print names of files, which would be run.
Randomization of jobs can be configured in the /etc/sysconfig/run-parts file. To enable randomization of jobs, set the RANDOMIZE
parameter to 1 and set the RANDOM parameter to an integer which determines a random seed. Additionally, you may configure the RAN-
DOMTIME parameter (again, by specifying an integer) to provide an additional level of randomization. Jobs are not randomized when
the RANDOM and RANDOMTIME parameters are set to 0. Values in these two parameters must be set to 1 or larger to provide a good
enough randomization.
Randomization of cron jobs can be useful for shared networks, where multiple cron jobs executed at once can cause spikes in traffic,
especially during daily jobs. With randomized jobs, the workload is evenly distributed throughout the day.
EXAMPLE OF CONFIGURATION FILE
RANDOMIZE=1
RANDOM=4
RANDOMTIME=8
Historically the crontab file contained configuration which called run-parts on files in cron.{daily,weekly,monthly} directories. These
jobs are now run indirectly through anacron to prevent conflicts between cron and anacron. That means the anacron package has to be
installed if the jobs in these directories should be running. Refer to the anacron(8) how to limit the time of day of the job execution.
EXAMPLE
/etc/cron.daily/jobs.deny could contain for example 0logwatch which forbid execution of this script.
SEE ALSO anacron(8), crontab(5)Marcela Malaova 2012-08-29 CRONTABS(4)