10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
How to get a file 'zlib.h' in an entire directory with an excluded directory specified lives under that starting directory by using find command, as it failed on:
$ find . -name 'zlib.h' -a -ipath 'CHROME.TMP' -prune -o -print
it'll just list entirely up (2 Replies)
Discussion started by: abdulbadii
2 Replies
2. Shell Programming and Scripting
Will the below bash delete all the "snps.ivg" in the given directory? Thank you :)
find N:\all_array\Samples -maxdepth 1 -type f -name "snps.ivg" -delete (6 Replies)
Discussion started by: cmccabe
6 Replies
3. UNIX for Dummies Questions & Answers
My input is as below :
/splunk/scrubbed/rebate/IFIND.REBTE.WROC.txt
/splunk/scrubbed/rebate/IFIND.REBTE.WROC.txt
/splunk/scrubbed/loyal/IFIND.HELLO.WROC.txt
/splunk/scrubbed/triumph/ifind.triumph.txt
From the above input I want to extract the file names only .
Basically I want to... (5 Replies)
Discussion started by: IshuGupta
5 Replies
4. UNIX for Dummies Questions & Answers
I think I know what this is doing, but the 'eval' is confusing
fname=$(echo ${lineItem} | awk 'BEGIN {FS=";"}{print $1}')
fname=${fname%%+(])}
fname=${fname##+(])}
eval "fname=${fname}"
The first line extracts the contents of the line preceeding the ";"
2nd & 3rd lines trim the value (I... (5 Replies)
Discussion started by: jdorn001
5 Replies
5. UNIX for Dummies Questions & Answers
Hello all!! I am new here and new in scripting!
I want to write a ksh script to select the most recent file from a dir and use it in a variable.
I have a directory with files named like: YYYMMDD
A basic idea of the script I want to write is
#!/usr/bin/ksh
latest= latest_dated_file at... (2 Replies)
Discussion started by: chris_euop
2 Replies
6. UNIX for Dummies Questions & Answers
Hello,
I wanted to see if there's a way to shortcut to a dated logs directory that changes daily...what I'm working with is something like this:
>
>
>
.
.
where the log directory is named yyyymmdd
I've created a shortcut to get me to the /log directory but was... (2 Replies)
Discussion started by: mojowtm6
2 Replies
7. UNIX for Dummies Questions & Answers
I need to find whether there is a file named vijay is there or not in folder named "opt" .I tried "ls *|grep vijay" but it showed permission problem.
so i need to use find command (6 Replies)
Discussion started by: amirthraj_12
6 Replies
8. Shell Programming and Scripting
Hi,
I have written this shell script:
fl=`ls -1lrt $mylist | grep '\.xml$' | awk '{print $9}'`
echo $fl (1)
for i in $fl
do
for dir in $mylist
do
if
then
echo $dir/$i >> tmp (2)
fi
done
done
The mylist contains some directory names. The satement (1) gives the sorted list... (5 Replies)
Discussion started by: surjyap
5 Replies
9. Solaris
I am using the following Command to delete Directory with contents. But this command is deleting inside files only not directories. is there any change need in my command?
find -type f -mtime +3 -exec rm -r {} \;
Thanks (3 Replies)
Discussion started by: bmkreddy
3 Replies
10. Shell Programming and Scripting
I have written the following simple bash script. It logs onto an FTP site and then CDs into a directory that corresponds to the last business day. So for example the directory I would access today is 20060110 (2006 jan 10).
I am currently taking today's date and subtracting 1, putting this... (3 Replies)
Discussion started by: steved
3 Replies