10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
Hitting a wall on this one. When at the command prompt it works fine:
# find /home/testuser -name 'PAINT*canvasON.txt'
/home/testuser/PAINT_canvasON.txt
# pwd
/home/testuser
# ls -l PAINT*canvasON.txt
-rw-r--r-- 1 root user 23 Feb 07 02:58 PAINT_canvasON.txt... (2 Replies)
Discussion started by: seekryts15
2 Replies
2. Shell Programming and Scripting
Hi ,
I've learnt that the following command will remove the files from the given folder for given no.of days
find /home/etc -type f -atime -10 -exec rm -f {} \;
But how can I change the above command that will move the files to another specified directory instead of removing the... (1 Reply)
Discussion started by: smile689
1 Replies
3. Shell Programming and Scripting
I have awk command :
awk -F ' ' '{ print $NF }' log filename
And it gives the output as below:
06:00:00
parameters:
SDS
(2)
no
no
no
no
doc=4000000000).
information: (6 Replies)
Discussion started by: ramprabhum
6 Replies
4. Shell Programming and Scripting
Hello,
I am trying to use regex wtih find command in KSH. For some reason it is not working as expected.
Input:
comm_000_abc_0102.c
comm_000_abc.c
456_000_abc_1212.cpp
456_000_abc_.cpp
Expected Output:
comm_000_abc_0102.c
kkm_000_abc_8888.cpp
(Basically I want to find all... (6 Replies)
Discussion started by: vinay4889
6 Replies
5. Shell Programming and Scripting
Hi!
I made a shell script which is offering menu choice. I made it on RHEL & then with little bit changes I was able to run successfully on AIX/ksh.
Script is working fine with no issues other than a little one i.e., There is one choice in which I can list out and delete some files from a... (10 Replies)
Discussion started by: sukhdip
10 Replies
6. Shell Programming and Scripting
Hi there,
I'm encountering problems on an AIX system when using following in my script.
find . -name *.edi -type f -exec sh -c 'scp {} $user@$server:$path || exit 5; mv {} $sent || exit 7' \;
the error i get is following
find: 0652-018 An expression term lacks a required... (4 Replies)
Discussion started by: Kerberos
4 Replies
7. Shell Programming and Scripting
Hi Forum.
When I run the following find command, I get the desired results:
find . \( -name a.out -o -name '*.o' -o -name 'core' \) -type f -ls
I want for my script to dynamically calculate and assign a variable var1 to contain all the files that I want to search instead of hard-coding.
... (2 Replies)
Discussion started by: pchang
2 Replies
8. UNIX for Advanced & Expert Users
Hi experts,
I have a simple shell script as follows.
#!/bin/ksh
FIND_STRING="\( -name 'testfile*.Z' -o -name 'DUMMY_*' \) "
find /tmp -type f $FIND_STRING -print
When I run this with ksh -x testscript, I get the following output.
+ FIND_STRING=\( -name 'testfile*.Z' -o -name... (6 Replies)
Discussion started by: kodermanna
6 Replies
9. UNIX for Dummies Questions & Answers
Folks,
I have been searching a dir for specfic files that have been accessed within a certain timeframe. The issue that I am having is that it picks up the .snapshot dir as well.
I am using the following:
find /probecards/ -name "S25E3N*" -mtime -1 -type f
Is this correct or how do I... (4 Replies)
Discussion started by: lodey
4 Replies
10. Shell Programming and Scripting
Hi Folks!
Can you help me with this find -printf command. I seem to be unable to execute the printf-command from my shell script. I'm confused: :confused:
My shell script snippet looks like this:
#!/bin/sh
..
COMMAND="find ./* -printf '%p %m %s %u %g \n'"
echo "Command: ${COMMAND}"... (1 Reply)
Discussion started by: grahamb
1 Replies