10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have the following script working currently. The only thing I want to add is to somehow tell the script to find the files using the find and maxdepth variables and then move the files to a corresponding file structure.
example:
file test.txt exists in the /data/user1/upload directory
The... (4 Replies)
Discussion started by: jwt66
4 Replies
2. Shell Programming and Scripting
test.txt is the dynamic file but some of combination are fix
like below are the lines
;wonder_off =
;wonder_off = disabled
wonder_off =
wonder_off = disabled
the test.txt can content them in any order
#cat test.xt
;wonder_off =
;wonder_off = disabled
wonder_off =
wonder_off =... (5 Replies)
Discussion started by: SilvesterJ
5 Replies
3. Shell Programming and Scripting
It saves me lot of typing and space/lines when I do not use full 'if' keyword and construct, instead use ..
&& <statement> || <statement>
that perfectly replaces..
if ; then
<statement>
else
<statement>
fi
Can I use following syntax when I want to add multiple statements under 'if'... (4 Replies)
Discussion started by: kchinnam
4 Replies
4. Shell Programming and Scripting
I'm looking to write a script that will do a find of directories and delete them if they are older than x days but keep the last x # of folders even if they are older than x days.
The usage is for a deployment location, so we want to keep the location clean but retain maybe the last 2 builds that... (5 Replies)
Discussion started by: MaureenT
5 Replies
5. UNIX for Advanced & Expert Users
Hi all,
I am trying to execute the following command:
find 'path' -ls -exec cksum {} \;
As you can see this simply finds files from a given path and runs cksum on them.
My problem is this, if i have a FIFO in a directory the find tries to execute cksum on it and gets stuck.
From the man page i... (9 Replies)
Discussion started by: noam128
9 Replies
6. Shell Programming and Scripting
help pls...
i would like to change this
CURVE2 565489 789458 1258649
random data here...
CURVE2 565489 568795 6548921
random data here...
CURVE2 565489 123598 6446259
random data here...
CURVE2 565489 672956 2489657
into this
CURVE2 565489 586423 1258649
random data here...... (2 Replies)
Discussion started by: lakanino
2 Replies
7. Shell Programming and Scripting
How to I put my find command string into a script. It is currently to long to be entered manually at command line.
for FNAME in `find /unixsxxx/interface/x.x/xxxxxx -type f \( -name '*.KSH' -o -name '*.sh' -o -name '*.sql' -o -name '*.ksh' \) -exec grep -il xxx.xxx.xxx.xxx {} \;`; do C=`grep -c... (5 Replies)
Discussion started by: TimHortons
5 Replies
8. Shell Programming and Scripting
Haven't worked in bash for ages. did a good bit of shell scripting in regular sh, but have forgotten most of it.
I have several thousand php files that now include the following line at the end of the file. There is no LF or CR/LF before it begins, it is just concatenated to the final line of... (3 Replies)
Discussion started by: sjburden
3 Replies
9. Shell Programming and Scripting
Hi All,
Can i use find command to know given date files? If yes, then please let me know the syntax for the same.
Thanks in advance for your postive responses
Regards,
Bachegowda (3 Replies)
Discussion started by: bache_gowda
3 Replies
10. Answers to Frequently Asked Questions
Perhaps the number one advanced find question is:
How to stop find from descending into subdirectories?
find command
Performing a non-recursive find in Unix
Use -prune with find command on AIX
Searching for files over 30 days old in current directory
disk space used for files with in a... (0 Replies)
Discussion started by: Perderabo
0 Replies