1) Will this delete existing files or that I will have to do manually?
(It would be good if this command can delete as well - otherwise i will have to fire this costly operation - find - once again to delete them. Although not a big problem..)
No, it will only archive the files. You should use another command to remove them:
If your find implementation does not support the + operator,
use xargs:
Quote:
2) I am not able to untar this directly. what's the way to check if this tar is safe (okay) ?
Below command returns me errors..
I need to make sure - the files are still good - before i delete uncompressed files...
I have a task to move more than 35000 files every two hours, from the same directory to another directory based on a file that has the list of filenames
I tried the following logics
(1)
find . -name \*.dat > list
for i in `cat list` do mv $i test/ done
(2)
cat list|xargs -i mv "{}"... (7 Replies)
I have a large Filesystem on an AIX server and another one on a Red Hat box. I have syncd the two filesystems using rsysnc.
What Im looking for is a script that would compare to the two filesystems to make sure the bits match up and the number of files match up.
its around 2.8 million... (5 Replies)
I want to tar large number of files about 150k.
i am using the find command as below to create a file with all file names.
& then trying to use the tar -I command as below.
# find . -type f -name "gpi*" > include-file
# tar -I include-file -cvf newfile.tar
This i got from one of the posts... (2 Replies)
Hellow i have a large number of files that i want to concatenate to one. these files start with the word 'VOICE_' for example
VOICE_0000000000
VOICE_1223o23u0
VOICE_934934927349
I use the following code:
cat /ODS/prepaid/CDR_FLOW/MEDIATION/VOICE_* >> /ODS/prepaid/CDR_FLOW/WORK/VOICE
... (10 Replies)
Hi. I need to delete a large number of files listed in a txt file. There are over 90000 files in the list. Some of the directory names and some of the file names do have spaces in them.
In the file, each line is a full path to a file:
/path/to/the files/file1
/path/to/some other/files/file 2... (4 Replies)
Hi All,
I am just curious, not programming anything of my own. I know there are libraries like gmp which does all such things. But I really need to know HOW they do all such things i.e. working with extremely large unimaginable numbers which are beyond the integer limit. They can do add,... (1 Reply)
I am running a code like this
foreach list ($tmp)
mv *_${list}.txt ${chart}_${list}.txt #mv: when moving multiple files, last argument must be a directory
mv *_${list}.doc ${chart}_${list}.doc #mv: when moving multiple files, last argument must be a... (3 Replies)
Hey, I'm kinda new to the shell scripting and I don't wanna mess things up yet :)
Looking for a solution to the following:
I need to move all the files like "filename.failed.dateandtime" to another directory also renaming them "filename.ready". I can't figure how to do this with multiple files... (4 Replies)
Want to sftp large number of files ... approx 150 files will come to server every minute. (AIX box)
Also need make sure file has been sftped successfully...
Please let me know :
1. What is the best / faster way to transfer files?
2. should I use batch option -b so that connectivity will be... (3 Replies)
Hi Guys,
how to count number of files successfully copied while coping files from source to destination path
ex:10 files from source to target location copying
if 8 files copied successfully then
echo successfully copied=8
failure=2 files
if two files get error to coping files from... (23 Replies)
Discussion started by: sravanreddy
23 Replies
LEARN ABOUT MOJAVE
shar
SHAR(1) BSD General Commands Manual SHAR(1)NAME
shar -- create a shell archive of files
SYNOPSIS
shar file ...
DESCRIPTION
shar writes an sh(1) shell script to the standard output which will recreate the file hierarchy specified by the command line operands.
Directories will be recreated and must be specified before the files they contain (the find(1) utility does this correctly).
shar is normally used for distributing files by ftp(1) or mail(1).
SEE ALSO compress(1), mail(1), tar(1), uuencode(1)BUGS
shar makes no provisions for special types of files or files containing magic characters.
EXAMPLES
To create a shell archive of the program ls(1) and mail it to Rick:
cd ls
shar `find . -print` | mail -s "ls source" rick
To recreate the program directory:
mkdir ls
cd ls
...
<delete header lines and examine mailed archive>
...
sh archive
HISTORY
The shar command appears in 4.4BSD.
SECURITY CONSIDERATIONS
It is easy to insert trojan horses into shar files. It is strongly recommended that all shell archive files be examined before running them
through sh(1). Archives produced using this implementation of shar may be easily examined with the command:
egrep -v '^[X#]' shar.file
4.4BSD June 6, 1993 4.4BSD