10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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
2. Shell Programming and Scripting
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)
Discussion started by: vegasluxor
9 Replies
3. Shell Programming and Scripting
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)
Discussion started by: murari83.ds
12 Replies
4. HP-UX
Hello; trying to find processes older than n days, mostly user shells Tried the following code on 11.31 box: in this case older than 5 days
UNIX95= ps -ef -o user,pid,ppid,cpu,etime,stime | grep "-" | awk '{print $2}' | xargs ps -ef|grep -v '?' |\
awk '$5 !~ ""' | awk '($5 ~ "$(date "+%b")")... (6 Replies)
Discussion started by: delphys
6 Replies
5. Shell Programming and Scripting
Hello All,
I need to write a script/command which can find out the number of .csv files residing in a directory older than 1 day. The output should come with
datewise (means for each date how many files are there).
I've this command, but this command gives the total number of files. It's... (10 Replies)
Discussion started by: NARESH1302
10 Replies
6. Shell Programming and Scripting
Hi All,
I am trying to automate some stuff to make my 'to-do-things' easier. I am in need for help regarding this.
I have an output
root 17187 3465 0 23:00:00 ? 0:01 Process1
root 4975 4974 0 May 12 ? 0:00 Process2
root 4042 16713 0 Jan 30 pts/22 0:00... (4 Replies)
Discussion started by: reddybs
4 Replies
7. Shell Programming and Scripting
Hi All,
I need to find the previous month last day minus one day, using shell script. Can you guys help me to do this.
My Requirment is as below:
Input for me will be 2000909(YYYYMM)
I need the previous months last day minus 1 day timestamp. That is i need 2000908 months last day minus ... (3 Replies)
Discussion started by: girish.raos
3 Replies
8. Shell Programming and Scripting
Hi, I need a .ksh script that lists all the process that are currently running and older than 3 days. once the process list is available i need to mail the list and then kill those processes.
Quick response is highly appreciated :b:
Thanks in Advance!!!
Sri (3 Replies)
Discussion started by: Sriranga
3 Replies
9. Shell Programming and Scripting
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
10. Shell Programming and Scripting
Hi ,
I am relatively new to unix...
Can u pls help me out to find out if the first day of the month is a working day ie from (Monday to Friday)...using Date and If clause in Korn shell..
This is very urgent.
Thanks for ur help... (7 Replies)
Discussion started by: phani
7 Replies