Unix Qn asked in datastage interview:
I have diff type(.txt, .tmp, .bat etc) of file in 4 diff directories, I want move all '.txt' file from 4 directories to other folder.
And need to delete all the files except which are created TODAY?

Answer Posted / subhash

1.
mv dir1/*.txt TgtDir
mv dir2/*.txt TgtDir
mv dir3/*.txt TgtDir
mv dir4/*.txt TgtDir

2. find -mtime 1+ | del
(1+ 1day before created files, -5 --> files created last 5
days and 1 ---> created exact 1 day back )

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the some differences between 7.x and 8.x version of datastage?

734


in oracle target stage when we use load option and when we use upsert option?

1744


What are stage variables and constants?

694


If we take 2 tables(like emp and dept),we use join stage and how to improve the performance?

1622


whom do you report?

1500






Highlight the main features of datastage?

613


1)s.key generate 1 to 700 records today. tomorrow another 400 will updated how to update the records using s.key generator? 2)source is like :-- DB --> T/F stage1 --> seq1file T/f 1 is linking with T/F2 ---> seq 2 how to load the data? in source i given some conditions those r going in seq1. The another data will going to seq2 how to do this ?

1623


what is 'reconsideration error' and how can i respond to this error and how to debug this

2113


What is the process of killing a job in datastage?

581


root tree will find which is server job and which is parallel job?

1443


Can you explain tagbatch restructure operator?

697


What is a datastage job?

613


How many areas for files does datastage have?

636


How and where you used hash file?

653


What is a folder? Difference types of stages?

621