shell scripting with files- how to?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers shell scripting with files- how to?
# 1  
Old 04-02-2011
shell scripting with files- how to?

Hi, I'm trying to create a shell script that shows a report of each real user of the system showing for each user the list of files that is in $home and its subdirectories (sorted by hour of modification), clasified by file type, and finally showing the total size and number of files in that directory.
The commands should include 2 -t parameters for each user, and -u where it should only show the results for that particular user.

example of results:
Directory /home/ubu
ASCII English text:
git.txt
ELF 32-bit executable:
hello
init
init10
8 archives, 46 Mbytes.

Directory /home/ubu/...

etc
Any advises?
# 2  
Old 04-05-2011
There are some tutorials present in best wordpress hosting knowledbase section. Hope it helps.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Reconciling two CSV files using shell scripting

I have two CSV files file1, file2 as below File 1: Key, Value1, Value2, Value3, Value4,......value A,50,100,50,40,....,100 File 2: Key, value1,Value2,Value3,Value 4 so on... A,50,80,45,50..... Now, I want to check if key from file 1 is present in file 2 or not if present I want to... (9 Replies)
Discussion started by: hustler
9 Replies

2. Homework & Coursework Questions

UNIX shell scripting programming in files

Create 2 files in unix in 2 different directories, compare them and fetch common words between these 2 files. Print them on the screen and also redirect the output to your home directory in the below format: file 1 | file 2 line no: word 1 | line no: word 1 line no: word 2 | line no: word 2 line... (11 Replies)
Discussion started by: mounica bijjala
11 Replies

3. Shell Programming and Scripting

Shell Scripting on files in directory

Hi, The requirement is below: There are 5 files in a unix directory and i need to pick up latest file from the directory that i can do like this ls -lrt | tail -1 and this file can be processed. now the actual requirement is some times what will happen the second third...on files i.e(ls -lrt... (4 Replies)
Discussion started by: prawinmca
4 Replies

4. Shell Programming and Scripting

Compare two files using shell scripting

Hi, I need to compare two files using shell scripting. Say like: File1 AAAAAAAAAAAAAAAAAAAA BBBBBBBBBBBBBBBBBBBBB CCCCCCCCCCCCCCCCCCCCCCCCC eeeeeeeeeeeeeeeeeeeeeeeee DDDDDDDDDDDDDDDDDDDDDDDDDDDD File2 BBBBBBBBBBBBBBBBBBBBB DDDDDDDDDDDDDDDDDDDDDDDDDDDD AAAAAAAAAAAAAAAAAAAA ... (6 Replies)
Discussion started by: roshParab
6 Replies

5. Shell Programming and Scripting

Help ME with Shell scripting log files

I currently have a script that was written a while back and it generates it's own log file. I had to recently alter this script so that it would execute another script in parallel 10 times such as the following example; echo "It is currently: ";date int=0; cap=10; while((int <... (2 Replies)
Discussion started by: afbuisiii
2 Replies

6. Shell Programming and Scripting

how read the flat files from shell scripting

We are using sybase data base and we have the data base name called MasterDB. The data baase MasterDB contains 100's of tables like sample1, sample2, sample3...etc...sample100 To take the count of every table we have to execute the following commands use MasterDB //DB name go //execute... (1 Reply)
Discussion started by: shijoe
1 Replies

7. UNIX for Dummies Questions & Answers

Find and replace in all files using shell scripting

Hi all, I'm looking to find and replace a string in all HTML files within a certain directory, including subdirectories. Normally, I would play with this a little to get it to work, but I can't mess this up, so I'm going to ask here. Basically, I want to find "<title>" in all *.htm* files... (11 Replies)
Discussion started by: slothario
11 Replies

8. Shell Programming and Scripting

How to Rename/Convert Files in Shell Scripting?

Hi All, I want to Rename/Convert all the .doc files in to .pdf format. I am using the following Script. But the final output is not proper. ########################################## cd /u13/prepaid/ftpdata/INfiles/sap/ for name in `ls *.doc` do name1=`echo $name | sed -e... (11 Replies)
Discussion started by: hanu_oracle
11 Replies

9. Shell Programming and Scripting

Comparing two .txt files in shell scripting...

Hi, I have two big .txt files.and i need to compare those two files and redirect it into some other file. If any body wants to resolve this issue then i can send the two text files. Need some quick responce. Thanks, prakash (10 Replies)
Discussion started by: prakash123
10 Replies

10. Shell Programming and Scripting

rename files using shell scripting

Hi all, i want to rename some files in my directory using korn shell scripting. 1) i want to rename files who have no extension so that they will have the format: filename.extension and 2) i want the files who has extension initially, to stay the same (they will not be... (4 Replies)
Discussion started by: gfhgfnhhn
4 Replies
Login or Register to Ask a Question