The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Creating menus in script file sinjin UNIX for Dummies Questions & Answers 6 12-11-2007 12:00 AM
Creating a menu within a script file sinjin Shell Programming and Scripting 8 12-10-2007 01:18 AM
Help with a shell script for creating a log file heprox Shell Programming and Scripting 2 11-14-2006 02:00 AM
Help ! Script creating unwanted file boppr6470 Shell Programming and Scripting 2 10-05-2006 07:27 PM
Creating a file inside a script sendhilmani Shell Programming and Scripting 11 03-21-2006 08:24 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 12-30-2005
Rakesh Bhat Rakesh Bhat is offline
Registered User
  
 

Join Date: Dec 2005
Posts: 8
Error while creating .tar file using script

Hi,

I am getting following error while running script:

tar: can't change directories to /home/xyz/script: No such file or directory
tar: compress: No such file or directory
tar: getts.tar same as archive file

Following is my script:

#!/bin/bash

echo "You want:"
echo "1. zip files."
echo "2. remove files."
echo -n "Enter your option:"
read opt

echo -n "Enter full File path:"
read PATH
echo -n "Enter File name:"
read FILE

if [ $opt -eq 1 ]
then
#zip files

/usr/bin/tar -cvf $FILE.tar $PATH compress $FILE.tar

fi


Can some one give some solution.

thanks
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 06:52 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0