p5wizard thanks!!
but it still gives 1 error:
script[5]: 0403-057 Syntax error at line 8 : 'fi' is not expected.
1 ORIGFILE=/u2/imps/db/file.jn.200504041703
2 NEWFILE=${ORIGFILE}.new
3 MAXSIZE=30000
4 SIZE=$(ls -l ${FILEPATH}|awk '{print $5}')
5 if [ ${SIZE} -gt ${MAXSIZE} ]
6 then
7 mv...
ok tnx guys!
just another question.
I've found the file with that "find"-command.
Now how can I rename it?
like alexhu said?
something like this?
if find dirpath -name 'filename' -size 99999c
do
something
done
now I get an error:
fond: 0652-009: there is a missing conjonction
I entered this:
find /u2/imps/db -name file.jn* -size +20488c
(i saw in the man that the C is for the actual bytes and not for blocks)
Can you give an example for:
find /[dir to search] -name [yourfile] -s +[no of 512 byte blocks required]
I'm trying different things but it not works.
like:
find /u2/imps/db -name [file.jn*] -s +[20488]
and it returns:
find: 0652-017 -s is not a valid option.
anyone?
Hi
I'm new in AIX, so i really don't know much about it.
But i'm trying to write a script that does check a particular file for the size of it.
and when it has reached a size, the script should rename it to another file nam.
Can anyone tell me how to begin with this?
Thank you
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.