I need to find files that have the ending of .out and that are older than 20 days. However, I cannot use find as I do not want to search in the directories that are underneath the directory that I am searching in.
How can this be done?? Find returns files that I do not want. (2 Replies)
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)
Hi,
I have hundered's of files of the name
CMP_PORT_IN_P200903271623042437_20090328122430_err.xml in error directory of todays date ie 20090328 and in the file name 5th field specifies date only now i want to move all files of 20090328 to another directory i.e reprocess directory.
So... (3 Replies)
Hello!!
I have directories from 2008, with files in them. I want to create a script that will find the directoried from 2008 (example directory:
drwxr-xr-x 2 isplan users 1024 Nov 21 2008 FILES_112108), delete the files within those directories and then delete the directories... (3 Replies)
Dear Members,
I have a list of xml files like
abc.xml.table
prq.xml.table
...
..
.
in a txt file.
Now I have to search the file(s) in all directories and sub-directories and print the full path of file in a output txt file.
Please help me with the script or command to do so.
... (11 Replies)
Hi,
I would like to list all files, older than 7 days, in a directory, but exclude all subdirectories in the find command. If I use find . -type f -mtime +7 all files in the subdirs are also included. How can I exclude them?
Regards,
JW (6 Replies)
I need to archive the older than 30 day file to another uinx server.I have wrote the below uinx script.
for LOOK_DIR in /TempFiles
do
for FILE in `find ${LOOK_DIR} -mtime -30 -exec ls {} \;`
do
echo ${FILE} >> file_list ## This file will have the list of files copied and... (12 Replies)
Need to write a shell script on AIX box which will connect to different servers using SFTP and get the file count of only 1 day older files. (purging list)
How to achieve this?
On local server we can use:
find <path> -type f -mtime +1
But how to do it in case of SFTP? Please advise. Thanks... (9 Replies)
// AIX 6.1
I need to extract PIDs of
ps -ef |grep /usr/lib/lpd/pio | awk '{print $2}'
ps -ef |grep qdaemon |grep /usr/bin/ksh | awk '{print $2}'
that are older than 1 day.
I know find . -type f -mtime +1, but it doesn't work for PIDs.
Please let me know how to get the PIDs older than... (1 Reply)
I thought that this would work for grep'ing files older than 1 day.
ps -o etime,pid,user,args -e|awk '/^+-/'|sort -t- -n -k 1,1 |grep qdaemon |grep /usr/bin/ksh
But, it is not grep'ing any of files (i.e. below) older than 1 day.
d_prod 33757970 61999560 0 Oct 27 - 0:00... (8 Replies)
Discussion started by: Daniel Gate
8 Replies
LEARN ABOUT DEBIAN
dh-exec-install
DH-EXEC-INSTALL(1) dh-exec DH-EXEC-INSTALL(1)NAME
dh-exec-install - Install (and possibly rename) files.
SYNOPSIS
#! /usr/bin/dh-exec
debian/default.conf => /etc/my-package/start.conf
usr/bin/*
DESCRIPTION
Being a sub-command of dh-exec(1), this program must not be ran directly, but through dh-exec, which automatically runs all available
sub-commands if run bare; or explicitly with dh-exec --with=install.
It is meant to be used for dh_install(1) files, and those alone. If it finds that its input is not such a file, it will do nothing, but
echo back the contents.
The purpose of the program is to extend dh_install(1)'s functionality, by allowing to specify a destination filename.
This can be accomplished by a special syntax: the " => " mark between a source and a destination means that the source file should be
installed with the specified destination name.
For obvious reasons, the source must not be a wildcard, and the destination in this case must be a file, and not a directory.
All other non-comment lines are left alone.
RESTRICTIONS
Due to the way executable scripts are called from debhelper(1), there is no way to know what options were used for the original
dh_install(1). This means, that the --sourcedir option of dh_install(1) will not work correctly when dh-exec-install is in use.
IMPLEMENTATION
Internally, the renaming happens by creating a temporary directory under debian/tmp/, and copying (or moving, if the source was under
debian/tmp/ to begin with) the file there, with the new name.
This is done this way to allow dh_install(1) to do the real copying, and allow its options to continue working, even when renaming is
involved.
The temporary directory is put under debian/tmp so that it will be cleaned by dh_prep(1) when the clean target gets to run. Thus, no extra
code is needed anywhere to clean up the renamed files.
ENVIRONMENT
DH_EXEC_SCRIPTDIR
Indicates which directory the command-specific scripts should be sought for. If not specified, scripts will be searched for in
/usr/share/dh-exec/.
FILES
$DH_EXEC_SCRIPTDIR/dh-exec-install-*
The various scripts for the higher-level program.
SEE ALSO debhelper(1), dh-exec(1), dh_install(1)AUTHOR
dh-exec-install is copyright (C) 2011-2012 by Gergely Nagy <algernon@madhouse-project.org>.
2012-05-03 DH-EXEC-INSTALL(1)