02-13-2008
If your archiving something like /var/log you might use something like logrotate and then rsync all the rotated logs.
or find all files that are mtime an hour or more ago
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi all,
Is there any way I can check a file for the linefeed character at the end of the file, and append one only if it is missing (ie. Incomplete last line)?
Need to do this because I need to write a script to process files FTP-ed over from various machines, which may or may not be... (1 Reply)
Discussion started by: ziyi
1 Replies
2. Shell Programming and Scripting
Hi folks,
I am using the join command to join two files on a common field as follows:
File1.txt
Adsorption|H01.181.529.047
Adult|M01.060.116
Children|M01.055
File2.txt
5|Adsorption|C0001674
7|Adult|C000001
6|Children|C00002
join -i -t "|" -a 2 -1 1 -2 2 File1.txt File2.txt
This... (7 Replies)
Discussion started by: s0460205
7 Replies
3. Shell Programming and Scripting
I'm running Fedora Core 6 as an FTP server on a powerMac G4...
I'm trying to create a script to remove files older than 3 days...
I'm able to find all data older than 3 days but it finds hidden files such as
/home/ftp/goossens/.canna
/home/ftp/goossens/.kde... (4 Replies)
Discussion started by: James_UK
4 Replies
4. Shell Programming and Scripting
On Solaris & AIX, suppose there is a directory 'dir'.
Log files of size approx 1MB are continuously being
deposited here by scp command. I have a script that scans
this dir every 5 mins and moves away the log files that
have been deposited so far.
How do I design my script so that I pick up... (6 Replies)
Discussion started by: sentak
6 Replies
5. Shell Programming and Scripting
Is there a way to customize ls to ignore files ending with ~ and #? (those are Emacs backup and auto-save files). I found -B option, which only ignores ~ files (2 Replies)
Discussion started by: yaroslavvb
2 Replies
6. UNIX for Dummies Questions & Answers
Sorry for the odd title, but I couldn't think of an easy way to describe my issue.
Background
I have a home security system that continually sends (via FTP) 4 different still images to a directory on my personal website - cam0.jpg, cam1.jpg, etc. I've written an extremely basic html script to... (4 Replies)
Discussion started by: CinciJeff
4 Replies
7. Shell Programming and Scripting
Hi All,
I am bit puzzled with this requirement where I need to list the files in a directory. However, files are being continuously written to this folder through FTP. Hence I need to exclude the file which is being written at the time of listing the directory. I thought of using file time... (5 Replies)
Discussion started by: angshuman
5 Replies
8. Shell Programming and Scripting
i am trying to recursively save a remote FTP server but exclude the files immediately under a directory directory1
wget -r -N ftp://user:pass@hostname/directory1
I want to keep these which may have more files under them
directory1/dir1/file.jpg
directory1/dir2/file.jpg... (16 Replies)
Discussion started by: vanessafan99
16 Replies
9. Red Hat
Hi,
Need help for the below scenario..
Its a linux os snapshot which has been taken based on taking snapshot using lvcreate..while taking rootvg it taking an dump file of 2GB unnecessarily..
So any tricks to avoid the dump file while creating snapshot using lvcreate (0 Replies)
Discussion started by: ksgnathan
0 Replies
10. UNIX for Beginners Questions & Answers
Hello All,
May i please know how do i ensure my split command would NOT generate incomplete output files like below, the last lines in each file is missing some columns or last line is complete.
split -b 50GB File File_
File_aa
|551|70210203|xxxxxxx|12/22/2010 20:44:58|11/01/2010... (1 Reply)
Discussion started by: Ariean
1 Replies
LEARN ABOUT ULTRIX
whereis
whereis(1) General Commands Manual whereis(1)
Name
whereis - locate source, binary, and or manual for program
Syntax
whereis [-sbm] [-u] [-SBM dir... -f] name...
Description
The command locates source/binary and manuals sections for specified files. The supplied names are first stripped of leading pathname com-
ponents and any (single) trailing extension of the form ``.ext'', for example,``.c''. Prefixes of ``s.'' resulting from use of source code
control are also dealt with. The command then attempts to locate the desired program in a list of standard places.
Options
-S dir
Search for source files in specified directory.
-B dir
Search for binary files in given directory.
-M dir
Search for manual section files in given directory.
-b Searches only for binary files.
-f Terminates last directory list created from use of -S, -B or -M flags and signals the start of file names.
-m Searches only for manual section files.
-s Searches only for source files.
-u Searches for files that do not have one of binary, source or manual section files. A file is said to be unusual if it does not have one
entry of each requested type. Thus ``whereis -m -u *'' asks for those files in the current directory which have no documentation.
Examples
The following finds all the files in which are not documented in with source in
cd /usr/ucb
whereis -u -M /usr/man/man1 -S /usr/src/cmd -f *
Restrictions
Since the program uses to run faster, pathnames given with the -M -S and -B must be full. That is, they must begin with a ``/''.
Files
/usr/src/*
/usr/{doc,man}/*
/lib, /etc, /usr/{lib,bin,ucb,old,new,local}
whereis(1)