Hi !
i have to write a script that archivs homes not used since 3 years.
First, my script gathers the users that are concerned, using the following command :
ll -lt /home/*/.sh_history | egrep '2000|1999|1998|1997' | awk '{print $3}'
i obtain a list like this :
user_1
user_2
...... (3 Replies)
I need to compress and tar a couple files in a directory, but I also want the original files unchanged, ie
if I compress a1.cpp , then a1.cpp becomes a1.cpp.z,
but what I want after running the compress utility is to have both
a1.cpp as it is and
a1.cpp.z
and then tar a1.cpp.z to an... (4 Replies)
Hi all,
I am supposed to collect a huge amount of log files from a unix system (HP-UX) onto a local system. The log files are not in one place, but they are scattered all over the Unix server. The unix server has only limited space, so that I can not create a tar file first and then compress it.... (4 Replies)
Could someone please help?
I'm trying to compress all the files in a directory without extension. I know for typical files with extension, the command is something like:
tar -zcvf file.tar.gz *.doc
What is the command for files without extension? Thanks. (4 Replies)
Hi,
When i am tar the file particular ,csv file format in a folder i am receiving the error
Command:
tar cf New_data.tar /new/file/mari/getdata/small/*.xml
Arguements too long
But sometimes
i am able to compress other folder but the tar folder contains all the file format and... (10 Replies)
I know there is a way to tar up directory and sub-directories and have it compressed all in one command but but the syntax escapes me.
I seem to re-call something like this:
tar -cvf /tmp/file.tar - | compress ?
Can somebody please provide me with the syntax on how to tar/compress
and... (6 Replies)
Hi All,
I want to compress a .war file.
bash-3.00$ ls -l /opt/test
-rw-r--r-- 1 test test 15M Aug 22 18:20 old.war
bash-3.00$ find . -type f -exec compress {} \;
./irc.war: -- file unchanged
While try to compress the above file i am getting "file unchanged error"... (7 Replies)
I have a tar file with name DTT012_GP_20140207.tar and many more with different names of different sizes ranging from 1GB to 4GB.
Now my requirement is to extract/not extract these files and then divide it into various parts of size 500MB and save it with different names and then compress... (5 Replies)
I would like to compress the files in multiple directories. For some reason, it only compress the first directory (/Sanbox/logs1) but not the rest of the other directories ("/Sanbox/logs2" "/Sanbox/logs3" "/Sanbox/logs4" ). Any help would be appreciated. Here's my code:
#!/bin/bash... (1 Reply)
Discussion started by: Loc
1 Replies
LEARN ABOUT SUSE
sendfiles
SENDFILES(1) [nmh-1.5] SENDFILES(1)NAME
sendfiles - send multiple files via a MIME message
SYNOPSIS
sendfiles [delay] mailpath subject file1 [file2 ...]
DESCRIPTION
The shell script sendfiles, is used to send a collection of files and directories via electronic mail.
sendfiles mailpath "subject" files ...
sendfiles will archive the files and directories you name with the tar command, and then mail the compressed archive to the "mailpath" with
the given "subject". The archive will be automatically split up into as many messages as necessary in order to get past most mailers.
Sometimes you want sendfiles to pause after posting a partial message. This is usually the case when you are running sendmail and expect
to generate a lot of partial messages. If the first argument given to sendfiles starts with a dash, then it is interpreted as the number
of seconds to pause in between postings, e.g.,
sendfiles -30 mailpath "subject" files ...
will pause 30 seconds in between each posting.
Extracting the Received Files
When these messages are received, invoke mhstore once for the list of messages. The default is for mhstore to store the combined parts as
a new message in the current folder, although this can be changed using storage formatting strings. You can then use mhlist to find out
what's inside; possibly followed by mhstore again to write the archive to a file where you can subsequently uncompress and untar it. For
instance:
% mhlist 5-8
msg part type/subtype size description
5 message/partial 47K part 1 of 4
6 message/partial 47K part 2 of 4
7 message/partial 47K part 3 of 4
8 message/partial 18K part 4 of 4
% mhstore 5-8
reassembling partials 5,6,7,8 to folder inbox as message 9
% mhlist -verbose 9
msg part type/subtype size description
9 application/octet-stream 118K
(extract with uncompress | tar xvpf -)
type=tar
conversions=compress
% mhstore 9
% uncompress < 9.tar.Z | tar xvpf -
Alternately, by using the -auto switch, mhstore will automatically do the extraction for you:
% mhlist 5-8
msg part type/subtype size description
5 message/partial 47K part 1 of 4
6 message/partial 47K part 2 of 4
7 message/partial 47K part 3 of 4
8 message/partial 18K part 4 of 4
% mhstore 5-8
reassembling partials 5,6,7,8 to folder inbox as message 9
% mhlist -verbose 9
msg part type/subtype size description
9 application/octet-stream 118K
(extract with uncompress | tar xvpf -)
type=tar
conversions=compress
% mhstore -auto 9
-- tar listing appears here as files are extracted
As the second tar listing is generated, the files are extracted. A prudent user will never put -auto in the .mh_profile file. The correct
procedure is to first use mhlist to find out what will be extracted. Then mhstore can be invoked with -auto to perform the extraction.
FILES
$HOME/.mh_profile The user profile
PROFILE COMPONENTS
Path: To determine the user's nmh directory
Current-Folder: To find the default current folder
SEE ALSO mhbuild(1), mhlist(1), mhshow(1), mhstore(1). Proposed Standard for Message Encapsulation (RFC-934)
DEFAULTS
`-noverbose'
CONTEXT
None
MH.6.8 11 June 2012 SENDFILES(1)