01-26-2011
write a program in c in unix that display the files(includ sub-direc and files within) in a sorted
the sorting is based on name of file,
file size
modification time stamps o f file
it should dislay the output in the following format
[inode number][size][last modification time][parent directory][filename]
"." and ".." enteries should be ignored
please give some idea how to do it
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all,
please give me the commands using which i can compare 2 sorted files and get the difference in third file, indiating where the difference is from either file1 or file2.
as:
File1 (Original file)
GARRY
JOHN
JULIE
SAM
---------------
File2
DEV
GARRY
JOHN
JOHNIEE (7 Replies)
Discussion started by: varungupta
7 Replies
2. Solaris
Hi,
I want to know the command which can be used for finding the % of disk space occupied by files & sub-folders inside a given mount in Sun Solaris
For eg: I have /tmp/ folder when I sat df -k it will give the percentage of space used by /tmp/.
Say if I want to see how much % the files &... (2 Replies)
Discussion started by: weblogicsupport
2 Replies
3. Programming
Hi,
I want to merge two files with sorted integers. I want to merge two files to a single file such that there are no duplicates and the merged file should contain the integers in the sorted order. Just some idea or pointer to an implementation will help me a lot.
Thanks & Regards,... (4 Replies)
Discussion started by: brett01
4 Replies
4. Shell Programming and Scripting
Hi ,
Please help me getting this done.
Write an automated shell program(s) that can create, monitor the log files and report the issues for matching pattern.
(i) Conditions for creating log files.
Log file is created with date (example 2010_03_27.log). If the log file size is 10 Mb for... (1 Reply)
Discussion started by: itian2010
1 Replies
5. Shell Programming and Scripting
Hello friends,
I am a script which dispalys a multiple files with their contents.
for exm:
suppose two file test1.txt and test2.txt.
when I run my script it have to display the below O/P.
test1.txt
-rw-r----- 1 sranga staff 91 Sep 23 02:18 calc.sh
-rw-r----- 1 sranga ... (2 Replies)
Discussion started by: sivaranga001
2 Replies
6. Shell Programming and Scripting
Hi all
I have directory /tmp and i have logs are written in it every 18 to 20 hours in date format.
now i need write some if condition which can find which files came into /tmp dir with name start from LOG_`date`.log in last 24 hours.
can somebody help me on this. (2 Replies)
Discussion started by: tapia
2 Replies
7. Shell Programming and Scripting
I have multiple files; each file contains a certain data in a column view
simply i want to combine all those files into one file in columns
example
file1:
a
b
c
d
file 2:
1
2
3
4
file 3:
G (4 Replies)
Discussion started by: ahmedamro
4 Replies
8. Shell Programming and Scripting
Hi
I have a requirement like below
I need to sort the files based on the timestamp in the file name and run them in sorted order and then archive all the files which are one day old to temp directory
My files looks like this
PGABOLTXML1D_201108121235.xml... (1 Reply)
Discussion started by: saidutta123
1 Replies
9. Shell Programming and Scripting
Hi , Need to shell script to extracts files names and write those to another file in different directory.
input file is
inputfile.txt
abc|1|bcd.dat
123 david123
123 rudy2345
124 tinku5634
abc|1|def.dat
123 jevid123
123 qwer2345
124 ghjlk5634
abc|1|pqr.txt
123 vbjnnjh435
123 jggdy876... (1 Reply)
Discussion started by: dssyadav
1 Replies
10. UNIX for Dummies Questions & Answers
I am hoping someone can give me a good free web resource for writing code to compile a binary executable. I am getting fairly decent at writing shell script, are the .f files just shell scripts? Also, I don't know where to begin on the makefiles. The reason I am curious is because I have been... (6 Replies)
Discussion started by: butson
6 Replies