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
which r the connectors used in san?
Name the different types of Lookups in Datastage?
If you want to use the same piece of code in different jobs, how will you achieve it?
What are the different types of lookups in datastage?
How to manage date conversion in Datastage?
Difference between ‘validated ok’ and ‘compiled’ in data stage?
How will you load you daily/monthly jobs datas in to Fact and Dimension table using datastage.
Different ways a project can be moved to production ?...example ….export-import and Version control.
Give an idea of system variables.
Explain how a source file is populated?
What is the use of hoursfromtime() function in transformer stage in datastage?
How to Remove Duplicate using SQL?
How to implement complex jobs in data stage?
Source has 2 columns: USA,NewYork INDIA,MUMBAI INDIA,DELHI UDS,CHICAGO INDIA,PUNE i want data in target like below: INDIA,MUMBAI1 INDIA,DELHI2 INDIA,PUNE3 USA,NEWYORK1 USA,CHICAGO2
Differentiate between hash file and sequential file?