10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi all,
So I am on server 1, and I want to grab the newest file from a particular directory on server 2, and place this in a directory on server 1.
I am trying to use: ls -tr | tail -1
This works, and gets me the newest file in a particular directory. Using svn `ls -tr | tail -1` etc I... (1 Reply)
Discussion started by: Lexx87
1 Replies
2. Shell Programming and Scripting
Hi all, I'm looking for a script to poll a specified directory and copy new files to another location.
The script should only copy new files so, I based on mtime I guess?
Can anyone point me in the right direction of a script which could do this?
My scripting skills aren't too bad, but... (1 Reply)
Discussion started by: JayC89
1 Replies
3. Shell Programming and Scripting
I am trying to copy files from one directory to another using shell script. Can anyone please troubleshoot the code.
thanks in advance...
#!C:\Shell\sh.exe
files_dir="C:\Documents and Settings\scripts\files"
backup_dir="C:\Documents and Settings\scripts\ztest"
echo cding to... (2 Replies)
Discussion started by: sureshcisco
2 Replies
4. Shell Programming and Scripting
i have a working bash script to list filename from multiple directories. Would you know how can i copy the result of ls -ltrh into a different directory?
sample:
ls -ltrh /dir1 /dir1/dir2 |grep $KEYWORD
thank you (2 Replies)
Discussion started by: lhareigh890
2 Replies
5. Shell Programming and Scripting
I am new to shell scripting so i need some help need how to go about with this problem.
I have a directory which contains files in the following format. The files are in a diretory called /incoming/external/data
AA_20100806.dat
AA_20100807.dat
AA_20100808.dat
... (4 Replies)
Discussion started by: ziggy25
4 Replies
6. Shell Programming and Scripting
Hi,
Plaese help me with perl script which copies the latest directory
This is a double post. Continue at your original thread. Thanks. (0 Replies)
Discussion started by: shaveta
0 Replies
7. Shell Programming and Scripting
I have a folder that has new files created everyday, is there a way i can filter them so that only the 5 newest files are displayed? I'm hoping this can be done by a one liner without a script.
for example my directory contains
-rw-r--r-- 1 root root 0 Jun 24 08:34 file112
-rw-r--r-- 1 root... (2 Replies)
Discussion started by: zerofire123
2 Replies
8. Shell Programming and Scripting
Hi All,
I am new user of shell scripting has come up with a problem. that I have a directory structure like :
Home
|
|--------A
| |----trunk
| |-------A_0_1/
| |
| |-------A_0_2/
|
|--------B
| ... (6 Replies)
Discussion started by: bhaskar_m
6 Replies
9. Shell Programming and Scripting
I have to do a directory clean up on several machines. The task is as follows:
go to a particular directory (cd /xxx)
1. create a directory ' SCRIPTCLEANUP ' ( i KNOW IT)
loop through
2. List the directory
3. if directory and start with 'DQA' leave it,
4. if directory or file move it to... (0 Replies)
Discussion started by: ajaya
0 Replies
10. Shell Programming and Scripting
I have written the following simple bash script. It logs onto an FTP site and then CDs into a directory that corresponds to the last business day. So for example the directory I would access today is 20060110 (2006 jan 10).
I am currently taking today's date and subtracting 1, putting this... (3 Replies)
Discussion started by: steved
3 Replies