Sponsored Content
Top Forums Shell Programming and Scripting print all files of a directory Post 302095173 by monica on Friday 3rd of November 2006 07:01:13 PM
Old 11-03-2006
thanks sysgate ....!

well
i`m working in the idea but i dont have de unix here(i am at home it is for the work)

I need opinions about this

Work? Smilie Smilie

MYDIR=/usr/xgf/mislib/ftp2prn

cd $MYDIR

ls -l > /usr/tmpA
cantarch = `wc -l /usr/tmpA`

if ($cantarch > 0) then
ls -1 $MYDIR | lp
ls -1 $MYDIR | rm
rm tmpA
else
rm /usr/tmpA
endif


Regards

Monica
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

FTP files from different directory from remote server to one directory in local

Hi All, I want to search for .log files from folders and sub folders in remote server and FTP them to one particular folder in the local machine. I dont want to copy the entire directory tree structure, just have to take all the .log files from all the folders by doing a recursive search from the... (3 Replies)
Discussion started by: dassv
3 Replies

2. 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

3. Shell Programming and Scripting

Print the name of files in the directory using Perl

Hi All, I am stuck with a problem and i want your help, what i want to do is I have a directory name dircome and there are 6 files present in this directory, the name of the files are d1,d2,d3,d4,d5,d6. The Perl script print the files name, means the output should be d1 d2 d3 d4 d5 d6 (9 Replies)
Discussion started by: parthmittal2007
9 Replies

4. Shell Programming and Scripting

Help needed to print the not updated files in the Directory

Hi All, I have written one program to print the files which are not updated in the specified directory in .Dat file. If I am executing the same command in the command prompt its working fine but if I am executing in shell script it's not working fine. Please correct if any thing wrong in the... (3 Replies)
Discussion started by: bbc17484
3 Replies

5. UNIX for Dummies Questions & Answers

Print all the directory with no directory name mydir

directory structure: 100k server1/ab_1234567_1/mydir 500k server1/ab_1234567_2 100k server1/ab_1234567_3/mydir 100k server1/ab_1731458_9/mydir 600k server1/ab_1234569_1 100k server1/ab_1234569_4/mydir 100k server1/ab_1234510_40/mydir 800k server1/ab_1234511_1 is there any way to generate... (10 Replies)
Discussion started by: lxdorney
10 Replies

6. AIX

How to set owner and permission for files/directory in directory in this case?

Hi. My example: I have a filesystem /log. Everyday, log files are copied to /log. I'd like to set owner and permission for files and directories in /log like that chown -R log_adm /log/* chmod -R 544 /log/*It's OK, but just at that time. When a new log file or new directory is created in /log,... (8 Replies)
Discussion started by: bobochacha29
8 Replies

7. 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

8. 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

9. UNIX for Beginners Questions & Answers

Search strings from a file in files in a directory recursively; then print the string with a status

Hi All, I hope somebody would be able to help me. I would need to search a string coming from a file, example file.txt: dog cat goat horse fish For every string, I would need to know if there are any files inside a directory(recursively) that contains the string regardless of case.... (9 Replies)
Discussion started by: kokoro
9 Replies

10. UNIX for Beginners Questions & Answers

Print number of lines for files in directory, also print number of unique lines

I have a directory of files, I can show the number of lines in each file and order them from lowest to highest with: wc -l *|sort 15263 Image.txt 16401 reference.txt 40459 richtexteditor.txt How can I also print the number of unique lines in each file? 15263 1401 Image.txt 16401... (15 Replies)
Discussion started by: spacegoose
15 Replies
GATHER(1)						      General Commands Manual							 GATHER(1)

NAME
gather - gather up the files in a directory for transmission SYNOPSIS
gather [-s] source_dir [-d] dest_dir [-b] bytes [-f] file OPTIONS
-b Desired number of bytes per output file -d Destination directory -f Base name of output files -s Source directory EXAMPLES
gather # Collect files in current dir into 60K archives gather -d dir # Put the archives in dir gather -b 90000 # Try to produce 90K archives gather -s .. -d targ -b 5000 # Try to produce 5K archives DESCRIPTION
It is often useful to collect all the files in a directory into one or more archives for transmission by mail. This program collects all the files in the source directory (default: current directory) and puts them into a shar archive. The shar archive is then compressed and uuencoded. An attempt is made to have the final .uue file be about the given size (default: 60K), but since gather cannot really predict how much shar will add to the file, how much compress will reduce the file, and how much uue will add again, the sizes can fluctuate. If the -f file flag is given, the archives will be given the names file_00.uue, file_01.uue etc. If -f is not given, the name of the source directory is used as the base name. Since 7 characters of suffix are appended, the base name should not exceed 7 characters. GATHER(1)
All times are GMT -4. The time now is 03:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy