10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I have a list of files that was created with,
FILES='./'$FOLD'/'$FOLD'_continue/'$OPTIMIZE_ON'/'*'out.txt'
I am doing a loop on this list
for INPUT in $FILES
do
...
done
but I may not want to process everything. Is there a simple way to just process the first 5,10,n, etc in... (2 Replies)
Discussion started by: LMHmedchem
2 Replies
2. UNIX for Advanced & Expert Users
Find all files in the current directory only excluding hidden directories and files.
For the below command, though it's not deleting hidden files.. it is traversing through the hidden directories and listing normal which should be avoided.
`find . \( ! -name ".*" -prune \) -mtime +${n_days}... (7 Replies)
Discussion started by: ksailesh1
7 Replies
3. Shell Programming and Scripting
Hi,
I have a script similar to this
#!/bin/ksh
cd /orcl/bir/eod_badfiles
find ./ -type f -name "*.csv" -mtime +6 -exec rm -f {} \;
find ./ -type f -name "*.bad" -mtime +6 -exec rm -f {} \;
cd /orcl/bir
find ./ -type f -name "*.log" -mtime +6 -exec rm -f {} \;
This was working fine in one... (5 Replies)
Discussion started by: Gangadhar Reddy
5 Replies
4. UNIX for Dummies Questions & Answers
Hi All,
I am creating one script to Archive the older log files to Archive folder and deleting older files.
For example below path contains different sub folders. So searching for log files older than 2 days then zip and moving to Archive directory in the same directory.
Source files :-... (4 Replies)
Discussion started by: vadlamudy
4 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I would like to write a loop to change the names of files in a directory. The files are called data1.txt through data1000.txt. I'd like to change their names to a1.txt through a1000.txt. How do I go about doing that? Thanks! (2 Replies)
Discussion started by: evelibertine
2 Replies
6. UNIX for Dummies Questions & Answers
hi,
want to create script that takes name of directory and all files and will copy each file to new directory.
then fix errors like files do not exist or no permission to create new directory...
these what I have so far...
#!/bin/sh
dir=~/Documents/Scripts/Copy
for i in $(pwd) $(ls)... (23 Replies)
Discussion started by: me.
23 Replies
7. UNIX for Dummies Questions & Answers
I have a requirement to delete the files and folders under a given directory.
my directory structure is like this..
Data
|
A(Directory)
|_PDF(Directory)----pdf files
|_XML()Directory --xml files
|--files
|
B(Directory)
|_PDF(Directory)----pdf files
|_XML()Directory --xml files ... (1 Reply)
Discussion started by: ramse8pc
1 Replies
8. Shell Programming and Scripting
Hi,
I'm looking to create a script which will find all the files created in the last 24h in a directory starting with a few different letters and send them to the printer. This would be run through the cron each morning to print the last 24 hours files.
I have started with this to find all... (2 Replies)
Discussion started by: rab
2 Replies
9. UNIX for Dummies Questions & Answers
I have a directory (and many sub dirs beneath) on AIX system, containing thousands of file. I'm looking to get a list of all directory containing "*.pdf" file.
I know basic syntax of find command, but it gives me list of all pdf files, which numbers in thousands. All I need to know is, which... (4 Replies)
Discussion started by: r7p
4 Replies
10. Shell Programming and Scripting
hi Gurus,
can anyone provide a awk command to get teh count of number of file sin a specific directory.
appreciate any kind of information..
thanks (11 Replies)
Discussion started by: sish78
11 Replies