Printing files from a directory


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Printing files from a directory
# 1  
Old 10-01-2008
Printing files from a directory

Hi,

I need help in printing files from a directory.

eg: a directory called /home/ABC and there are 3 files in it.

I need to give printout one bye one. One more thing is I need to print date and the path on the top of each page...like...

Sep 30 14:22 2008 /home/ABC Page 1

I've been using command "pr" but couldnt succeed.

Thank You
# 2  
Old 10-05-2008

Doesn't this do what you want:

Code:
pr /home/ABC/*

If not, explain what's wrong with it.

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Directory containing files,Print names of the files in the directory that are exactly same content.

Given a directory containing say a few thousand files, please output a list of all the names of the files in the directory that are exactly the same, i.e. have the same contents. func(a_directory_name) output -> {“matches”: , ... ]} e.g. func(“/home/my/files”) where the directory... (7 Replies)
Discussion started by: anuragpgtgerman
7 Replies

2. Shell Programming and Scripting

List files with date, create directory, move to the created directory

Hi all, i have a folder, with tons of files containing as following, on /my/folder/jobs/ some_name_2016-01-17-22-38-58_some name_0_0.zip.done some_name_2016-01-17-22-40-30_some name_0_0.zip.done some_name_2016-01-17-22-48-50_some name_0_0.zip.done and these can be lots of similar files,... (6 Replies)
Discussion started by: charli1
6 Replies

3. Shell Programming and Scripting

Printing last modified sub-directory's files

hey, I need to write a command line (only one line), which prints the content of the files of the last modified sub-folder thanks in advance I have to use grep for this (3 Replies)
Discussion started by: sijaanh
3 Replies

4. Shell Programming and Scripting

Printing filenames in my current directory

Can someone give me a tip on writing a script that, for each file in the working directory, prints the filename, the # of lines, and the # of words to stdout? (2 Replies)
Discussion started by: flash123
2 Replies

5. UNIX for Dummies Questions & Answers

Printing directory starting from a particular folder

Hi there!:o I have a question if I have a directories ~/MyFolder/Files/PersonalFiles/databases/food/tomato ~/MyFolder/Files/PersonalFiles/databases/items/cup and I want my program to output food/tomato and items/cup, i.e. everything from the folder database but without... (5 Replies)
Discussion started by: FUTURE_EINSTEIN
5 Replies

6. Shell Programming and Scripting

Grepping file names, comparing them to a directory of files, and moving them into a new directory

got it figured out :) (1 Reply)
Discussion started by: sHockz
1 Replies

7. Programming

help with printing file names in current directory for C

How do I print all the file names in current directory in C? (6 Replies)
Discussion started by: omega666
6 Replies

8. Shell Programming and Scripting

printing a directory structure

Hey everyone I am just trying print a directory structure but I am not getting the desired output. I am using AIX. Script : input file contains : TNP\\ECOM\\test\\1 input_file=folders.txt cat $input_file | while read line do echo $line done (3 Replies)
Discussion started by: rocker_me2002
3 Replies

9. UNIX for Dummies Questions & Answers

printing number of files ONLY in ~ directory

Could someone help me please. I'm trying to write a shell script that prints the number of files I have in my home directory. Files only though, directories not included. I was thinking about using a pipe that includes wc but I don't know any commands that isolate the number of files you have in... (4 Replies)
Discussion started by: fasdafdsf
4 Replies

10. UNIX for Dummies Questions & Answers

Printing a Directory Listing in Unix

Does anyone know if there is a way to print the list of files contained in a directory (besides screen print)? Thanks!!! (10 Replies)
Discussion started by: lfulton
10 Replies
Login or Register to Ask a Question