03-12-2009
If you already know how to use "find" to get all the files from a date, just use the "-exec" flag and cat each file onto your big file.
The only gotcha is that you'll want to be sure (by naming convention, perhaps) that the file you're appending to is unique for each day.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Not sure how to do this exactly.. just want to take the first 100 lines of a file and cat it out into a second file. I know I can do a more on a file and > it into a different file, but how can I make it so only the first 100 lines get moved over? (1 Reply)
Discussion started by: LordJezo
1 Replies
2. UNIX for Dummies Questions & Answers
I want to cat a file with only show the line contain '/bin/bash' but don't show the line contain 'load' (don't show if the line contain 'load' and '/bin/bash' together), how to type in the command? thk a lot! (2 Replies)
Discussion started by: zp523444
2 Replies
3. Shell Programming and Scripting
helo all
I have a file where lines start with ~|.
Given a sample line-> ~|21|123|1232|ABC|2135....
So when i use the command
-----cat $file | mailx -s "Rejects : $envid" $recip.dat------
When unix cats the file which holds lines starting with ~| it seems to be it takes those lines... (2 Replies)
Discussion started by: KenJo
2 Replies
4. Shell Programming and Scripting
Hey guys - i have a script (below) that searches for current files in a particular directory.
However i was wondering how to make it search for "yesterdays" file. For instance it looks for a file from yesterday and no older than that.
I used stat command to check for file information:
... (6 Replies)
Discussion started by: DallasT
6 Replies
5. Shell Programming and Scripting
Hi,
I have two files
one.txt
laptop
boy
apple
two.txt
unix
linux
OS
openS
I want to split one.txt into one line each and concatenate it with the two.txt
output files
onea.txt
laptop (4 Replies)
Discussion started by: avatar_007
4 Replies
6. Shell Programming and Scripting
how to cat a file by ignoring first line and last line (1 Reply)
Discussion started by: thelakbe
1 Replies
7. UNIX for Advanced & Expert Users
Hi All,
I have stumbled upon very unique issue. In my script I am doing cat file and then greping and cutting so as to assign the value to variable. My file is,
<mxc_tl_load_extractdata_prop.bsh>
DB_USER=test_oper
hostname=xxx
FTP_USER=test1_operate
MAIL_LIST=xxx@yyy.com... (1 Reply)
Discussion started by: paragd
1 Replies
8. UNIX for Advanced & Expert Users
in bash:
for i in `cat file` ; do
echo $i
done;
how will i do this in perl ? (10 Replies)
Discussion started by: linuxgeek
10 Replies
9. UNIX for Dummies Questions & Answers
Using the find command to find files in a directory and automatically delete files older than 24 hours find . -mtime +0 | grep file | xargs rm. Using the find man page but I can't seem to make it work for files that have the previous day's time stamp but are not 24 hours old. Is there a way for... (4 Replies)
Discussion started by: jimmyf
4 Replies
10. Shell Programming and Scripting
Hello,
I'm on a remote computer by SSH. How can I get the output of "cat file" into a file on the local computer?
I cannot use scp, because it's blocked.
something like:
ssh root@remote_maschine "cat /file" > /locale_machine/file
:rolleyes: (2 Replies)
Discussion started by: borsti007
2 Replies
LEARN ABOUT OSX
vfs_shadow_copy
VFS_SHADOW_COPY(8) VFS_SHADOW_COPY(8)
NAME
vfs_shadow_copy - Make a Samba share read only for a specified time period
SYNOPSIS
vfs objects = shadow_copy
DESCRIPTION
This VFS module is part of the samba(7) suite.
The vfs_shadow_copy VFS module functionality that is similar to Microsoft Shadow Copy services. When setup properly, this module allows Mi-
crosoft Shadow Copy clients to browse "shadow copies" on Samba shares.
This module is stackable.
CONFIGURATION
vfs_shadow_copy relies on a filesystem snapshot implementation. Many common filesystems have native support for this.
Filesystem snapshots must be mounted on specially named directories in order to be recognized by vfs_shadow_copy. The snapshot mount points
must be immediate children of a the directory being shared.
The snapshot naming convention is @GMT-YYYY.MM.DD-hh.mm.ss, where:
o YYYY is the 4 digit year
o MM is the 2 digit month
o DD is the 2 digit day
o hh is the 2 digit hour
o mm is the 2 digit minute
o ss is the 2 digit second.
The vfs_shadow_copy snapshot naming convention can be produced with the following date(1) command:
TZ=GMT date +@GMT-%Y.%m.%d-%H.%M.%S
EXAMPLES
Add shadow copy support to user home directories:
[homes]
vfs objects = shadow_copy
CAVEATS
This is not a backup, archival, or version control solution.
With Samba or Windows servers, vfs_shadow_copy is designed to be an end-user tool only. It does not replace or enhance your backup and
archival solutions and should in no way be considered as such. Additionally, if you need version control, implement a version control sys-
tem.
VERSION
This man page is correct for version 3.0.25 of the Samba suite.
AUTHOR
The original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed by the Samba Team as an Open
Source project similar to the way the Linux kernel is developed.
VFS_SHADOW_COPY(8)