Need a script to tar all file systems on the machine into one filesystem.


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Need a script to tar all file systems on the machine into one filesystem.
# 1  
Old 09-17-2008
Need a script to tar all file systems on the machine into one filesystem.

Hi
I am very poor at scripting.Smilie

I need to develop a script that should tar up all the filesystems on the machine on to a single filesystem called /tarfilesystem.

Any suggestions ...
Thank You very much
# 2  
Old 09-17-2008

Code:
tar cf /tarfilesystem/all.tar $( echo /* | grep -v tarfilesystem)

(This assumes that there are no spaces in the directory names in the root directory.)
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script to check if file systems are mounted

Hi I have the following piece of code, running on a solaris 10 O.S., that is not working for NFS file systems: for vol in `grep -E 'vxfs|ufs|nfs' /etc/vfstab | egrep -v '^#' | awk '{ print $3 }'` do if df -k $vol | grep $vol > /dev/null then outputOK "Filesystem: $vol mounted" else... (1 Reply)
Discussion started by: fretagi
1 Replies

2. UNIX for Dummies Questions & Answers

UNIX command to check if file name ends with .tar OR if the file is a tar file

Hello Team, Would you please help me with a UNIX command that would check if file is a tar file. if we dont have that , can you help me with UNIX command that would check if file ends with .tar Thanks in advance. (10 Replies)
Discussion started by: sanjaydubey2006
10 Replies

3. Shell Programming and Scripting

How to transfer files from unix machine to local machine using shell script?

Hi All.. Am new to Unix!! Am creating a shell script in which a scenario is like i have transfer the output file from unix machine (Server) to local directory (Windows xp). And also i have to transfer the input file from the local directory to Unix machine (Server) Any help from you... (1 Reply)
Discussion started by: vidhyaS
1 Replies

4. Shell Programming and Scripting

shell script to copy files frm a linux machine to a windows machine using SCP

I need a shell script to copy files frm a linux machine to a windows machine using SCP. The files keeps changing day-to-day. I have to copy the latest file to the windows machine frm the linux machine. for example :In Linux, On July 20, the file name will be 20.txt and it should be copied to... (3 Replies)
Discussion started by: nithin6034
3 Replies

5. Red Hat

To find the LATEST file from a dir on REMOTE machine and SCP to local machine?

Hi All, URGENT - Please help me form a scipt for this: I need the LATEST file from a dir on REMOTE machine to be SCP'd to a dir on local machine. (and I need to execute this from local server) I know that the below cmd is used to find the LATEST file from a dir. But this command is not... (3 Replies)
Discussion started by: me_ub
3 Replies

6. UNIX for Dummies Questions & Answers

tar -cvf test.tar `find . -mtime -1 -type f` only tar 1 file

Hi all, 4 files are returned when i issue 'find . -mtime -1 -type f -ls'. ./ora_475244.aud ./ora_671958.aud ./ora_934052.aud ./ora_934050.aud However, when I issued the below command: tar -cvf test.tar `find . -mtime -1 -type f`, the tar file only contains the 1st file -... (2 Replies)
Discussion started by: ahSher
2 Replies

7. UNIX for Dummies Questions & Answers

Tar to remote machine

Is there a way to use Tar (not GNU) to automaticallly create a tar file on a remote machine. the source files will be local, but I would like tthe tar file to be remote. Thanks. (2 Replies)
Discussion started by: hshapiro
2 Replies

8. UNIX for Advanced & Expert Users

clone systems with tar command

I have several machines which I want to be exactly identical. It is the first time I am trying to clone machines and I searched on the internet and found many people archive and extract their disks using some tools, using dd, and I also found someone using tar. I read about different tools. I tried... (5 Replies)
Discussion started by: benja
5 Replies

9. Solaris

/var filesystem recovery from other machine

Hi Folks, I'm wordering if I can ufsdump the /var fs from a server1 and create a new /var fs in Server2, that is because some damage happened in the /var fs and we don't have backup of it, I've tried fsck and no sucess at all.. Any ideia how I can recovery that /var fs ? Thanks, ... (0 Replies)
Discussion started by: ramosbrazil
0 Replies

10. Shell Programming and Scripting

Creation and Transfer of TAR file from one machine to another Using UNIX script

Hi, I want to create unix script such that it should run on machine A, it should run TAR commands on machine B and copy that TAR to machine C. Is it possible? Thanks Rahul (2 Replies)
Discussion started by: rahuljadhav
2 Replies
Login or Register to Ask a Question