Sponsored Content
Top Forums Shell Programming and Scripting Finding directories older than 5 days Post 302416612 by pravin27 on Tuesday 27th of April 2010 05:53:03 AM
Old 04-27-2010
Hi,

Please post the your output after running your command.
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. Shell Programming and Scripting

Finding cumulative size of files older than certain days

Hi All, I've got a ton of files in a particular directory. I want to find pdf files older than 30 days in that directory and then the cumulative size of those files. Ex: find /home/jk/a -name "*.pdf" -mtime +30 consider it finds the below 4 files. /home/jk/a/1.pdf /home/jk/a/2.pdf... (1 Reply)
Discussion started by: rohan076
1 Replies

4. Shell Programming and Scripting

Deleting / finding files older than X days missess a day

Hi When trying to find and delete files which are, say, 1 day, the find command misses a day. Please refer the following example. xxxd$ find . -type f -ctime +1 -exec ls -ltr {} \; total 64 -rw-rw-r-- 1 oracle xxxd 81 Apr 30 11:25 ./ful_cfg_tmp_20080429_7.dat -rw-rw-r-- 1... (4 Replies)
Discussion started by: guruparan18
4 Replies

5. 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

6. Shell Programming and Scripting

Script for parsing directories one level and finding directories older than n days

Hello all, Here's the deal...I have one directory with many subdirs and files. What I want to find out is who is keeping old files and directories...say files and dirs that they didn't use since a number of n days, only one level under the initial dir. Output to a file. A script for... (5 Replies)
Discussion started by: ejianu
5 Replies

7. UNIX for Advanced & Expert Users

How to Remove 180 days older non-empty directories

Hi Gurus, I have command to delete more than 180days file. find /home/abc/ -name "CBST_*.txt*" -mtime +180 | xargs -n 100 rm -f Now I would like to delete more than 180days Non empty directory--What will be command? Following is non empty directory as instance CBST2010* (2 Replies)
Discussion started by: thepurple
2 Replies

8. UNIX for Dummies Questions & Answers

How to compress the directories which is older than 7 days?

Hi all, how to compress the directories which is older 7 days. If any one knows please help me this is urgent. Thanks in advance (3 Replies)
Discussion started by: rameshpagadala
3 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. Linux

Finding files older than x days within directory with spaces

Hi, I am trying to run a command that finds all files over x amount of days, issue is one of the directories has spaces within it. find /files/target directory/*/* -type f -mtime +60 When running the above the usual error message is thrown back + find '/files/target\' 'directory/*/*' -type... (1 Reply)
Discussion started by: Ads89
1 Replies
initctl(8)						      System Manager's Manual							initctl(8)

NAME
initctl - init daemon control tool SYNOPSIS
initctl [OPTION]... COMMAND [OPTION]... ARG... DESCRIPTION
initctl allows a system administrator to communicate and interact with the Upstart init(8) daemon. When run as initctl, the first non-option argument is the COMMAND. Global options may be specified before or after the command. You may also create symbolic or hard links to initctl named after commands. When invoked through these links the tool will behave only as that command, with global and command-specific options intermixed. The default installation supplies such links for the start, stop, restart, reload and status commands. OPTIONS
--system Communication with the init(8) daemon is normally performed over a private socket connection. This has the advantage of speed and robustness, when issuing commands to start or stop services or even reboot the system you do not want to be affected by changes to the D-Bus system bus daemon. The disadvantage to using the private socket however is security, init(8) only permits the root user to communicate over this socket which means that read-only commands such as status and list cannot be made by other users. The --system option instructs initctl to communicate via the D-Bus system bus rather than over the private socket. This is only possible if the system bus daemon is running and if init(8) is connected to it. The advantage is that the default security configuration allows non-root users to use read-only commands. --dest Specifies the well-known name of the init(8) daemon when using --system. There is normally no need to use this option since the init(8) daemon uses the default com.ubuntu.Upstart name. However it may be useful for debugging. --no-wait Applies to the start, stop, restart and emit commands. Normally initctl will wait for the command to finish before returning. For the start, stop and restart commands, finishing means that the named job is running (or has finished for tasks) or has been fully stopped. For the emit command, finishing means that all of the jobs affected by the event are running (or have finished for tasks) or have been fully stopped. This option instead causes these commands to only wait for the goal change or event to be queued. --quiet Reduces output of all commands to errors only. COMMANDS
start JOB [KEY=VALUE]... Requests that a new instance of the named JOB be started, outputting the status of the job to standard output when the command com- pletes. See status for a description of the output format. The optional KEY=VALUE arguments specify environment variables to be passed to the starting job, and placed in its environment. They also serve to specify which instance of multi-instance jobs should be started. Most jobs only permit a single instance; those that use the instance stanza in their configuration define a string expanded from environment variables to name the instance. As many unique instances may be started as unique names may be generated by the stanza. Thus the environment variables also serve to select which instance of JOB is to be acted upon. If the job is already running, start will return an error. stop JOB [KEY=VALUE]... Requests that an instance of the named JOB be stopped, outputting the status of the job to standard output when the command com- pletes. See status for a description of the output format and start for a discussion on instances. restart JOB [KEY=VALUE]... Requests that an instance of the named JOB be restarted, outputting the status of the job to standard output when the command com- pletes. See status for a description of the output format and start for a discussion on instances. Note that this command can only be used when there is an instance of JOB, if there is none then it returns an error instead of starting a new one. reload JOB [KEY=VALUE]... Sends the SIGHUP signal to running process of the named JOB instance. See start for a discussion on instances. status JOB [KEY=VALUE]... Requests the status an instance of the named JOB, outputting to standard output. See start for a discusson on instances. For a single-instance job a line like the following is output: job start/running, process 1234 The job name is given first followed by the current goal and state of the selected instance. The goal is either start or stop, the status may be one of waiting, starting, pre-start, spawned, post-start, running, pre-stop, stopping, killed or post-stop. If the job has an active process, the process id will follow on the same line. If the state is pre-start or post-stop this will be the process id of the equivalent process, otherwise it will be the process id of the main process. job start/pre-start, process 902 The post-start and pre-stop states may have multiple processes attached, the extra processes will follow on consecutive lines indented by a tab: job start/post-start, process 1234 post-start process 1357 If there is no main process, they may follow on the same line but will be prefixed to indicate that it is not the main process id being given: job start/post-start, (post-start) process 1357 Jobs that permit multiple instances have names for each instance, the output is otherwise identical to the above except that the instance name follows the job name in parentheses: job (tty1) start/post-start, process 1234 post-start process 1357 list Requests a list of the known jobs and instances, outputs the status of each to standard output. See status for a description of the output format and start for a discussion on instances. No particular order is used for the output, and there is no difference in the output (other than the instance name appearing in parentheses) between single-instance and multiple-instance jobs. emit EVENT [KEY=VALUE]... Requests that the named EVENT be emitted, potentially causing jobs to be started and stopped depending on their use of the start on and stop on stanzas in their configuration. The optional KEY=VALUE arguments specify environment variables to be included with the event and thus exported into the environment of any jobs started and stopped by the event. The environment may also serve to specify which instance of multi-instance jobs should be started or stopped. See start for a dis- cussion on instances. There is no limitation on the event names that may be emitted with this command, you are free to invent new events and use them in your job configurations. The most well known event used by the default Upstart configuration is the runlevel(7) event. This is normally emitted by the telinit(8) and shutdown(8) tools. reload-configuration Requests that the init(8) daemon reloads its configuration. This command is generally not necessary since init(8) watches its configuration directories with inotify(7) and automatically reloads in cases of changes. No jobs will be started by this command. version Requests and outputs the version of the running init daemon. log-priority [PRIORITY] When called with a PRIORITY argument, it requests that the init(8) daemon log all messages with that priority or greater. This may be used to both increase and decrease the volume of logged messages. PRIORITY may be one of debug, info, message, warn, error or fatal. When called without argument, it requests the current minimum message priority that the init(8) daemon will log and ouputs to stan- dard output. AUTHOR
Written by Scott James Remnant <scott@netsplit.com> REPORTING BUGS
Report bugs at <https://launchpad.net/upstart/+bugs> COPYRIGHT
Copyright (C) 2010 Canonical Ltd. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU- LAR PURPOSE. SEE ALSO
init(8) telinit(8) shutdown(8) Upstart 2010-02-04 initctl(8)
All times are GMT -4. The time now is 10:41 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy