9 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Greetings,
For housekeeping, I use the following command:
find /some/path -type f -name "*log*" ! -exec fuser -s "{}" 2>/dev/null \; -exec ls -lh {} \;
It finds all log files not currently in use by a process and manipulates them.
This command always works on linux and redhat machines,... (2 Replies)
Discussion started by: dampio
2 Replies
2. Shell Programming and Scripting
Main_script.sh
#! /bin/sh
./Sub_script.sh
rc=$?
echo "Return code from Sub_script.sh : $rc"
if ; then
echo "$rc = 991"
echo ""
exit 1
elif ; then
echo "$rc = 992"
echo ""
exit 1
elif ; then
echo "$rc = 0"
echo ""
exit 1
fi (2 Replies)
Discussion started by: duddukuri
2 Replies
3. Shell Programming and Scripting
I have the following files in a directory
> ls -1 /tmp/test/dir/
file with spaces 1.ogg
file with spaces 2.oggI am running the following to echo the filenames but alter the file extension on the files to .mp3 instead of .ogg ( I am going to run ffmpeg against the files ultimately, but keeping... (2 Replies)
Discussion started by: jelloir
2 Replies
4. Shell Programming and Scripting
Hi,
We are using a shell script which is called from COBOL program. Here the program works fine till we are using MicroFocus(MF) COBOL 4 and UNIX AIX 5.3.
Recently we have upgraded to MicroFocus(MF) COBOL 5.1 but same AIX version. now the shell script not working as expected.
The shell... (5 Replies)
Discussion started by: vensk27
5 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I am using the korn shell on Solaris box.
Why does the following 2 commands return different results?
This command returns no results (I already used this command to create a list of files which I moved to an archive directory)
find ????10??_*.dat -type f -mtime +91
However this... (15 Replies)
Discussion started by: stumpy1
15 Replies
6. Shell Programming and Scripting
Hi,
I've a find command like,
find /abcd/efgh -name "xxxx" 2> /dev/null > file1
what would be the condition to check if this returns none(means if the file "xxxx" is not present) ????
I tried checking with $? and it returns 72 to me but even the file is present also it returns... (6 Replies)
Discussion started by: skcvasanth
6 Replies
7. Shell Programming and Scripting
Hi all does find command return anything if the file to be searched is not found? Like if I search from a file in a dir does it return false or null if the file is not found? Please suggests. (3 Replies)
Discussion started by: Veenak15
3 Replies
8. Shell Programming and Scripting
Hi,
i wan to search the file starting with Admin into the directory Output. I am running below command:
find /appl/Output -name "Admin*" -prune
but this command is going into the sub directories present under output. I do not want to search under sub directories. Any help will be highly... (6 Replies)
Discussion started by: Vishal123
6 Replies
9. UNIX for Dummies Questions & Answers
I have a script with a find command using xargs to copy the files found to another directory. The find command is finding the appropriate file, but it's not copying. I've checked permissions, and those are all O.K., so I'm not sure what I'm missing. Any help is greatly appreciated.
This is... (2 Replies)
Discussion started by: mpflug
2 Replies