Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Hello, I am trying to use the command gzip to compress a directory or file list
as argument and compress the file in a file named copia101225, within a directory named ZIPFILES. I want to make sure that if the arguments doesn't exist, the destination directory doesn't exist that it creates it.
I keep failing at compressing the file to copia101225, that is within the directory named ZIPFILES
This is what I have so far:
#! / bin / bash
# Title: Compress a file
# Author: Jose Miguel Colella
# Description: Compress a file
read-p "Enter the file name" ARCHIVO_INPUT
cat test | while read line;
echo "Line $ count: $ line"
count = $ [$ count + 1]
qzip $ARCHIVO_INPUT > copia101225
I have a question, when I execute the scriptt (using bash) I get an error: gzip: *.txt: No such file or directory. mv: cannot stat `*.txt.gz': No such file or directory
Does the script that I started with wrong...should I just erase that because what I want to do is given a directory or given a list of files that it zips them in a file named copia, this copia is within a directory named CopiasSeguridad. If any of the arguments inserted don't exist than it created them
your code was helpful yet I got an error: tar: cowardly refusing to create an empty archive
I want it to accept files as arguments for example name arg1 arg2 arg3 arg4
# @ variable contains the string "arg1 arg2 arg3 arg4
an then compresses these files into a file copiaYYMMDD
where YY stands for the year, MM stands for the month, and DD stands for the days.
the file copiaYYMMDD is in a directory named CopiasSeguridad
this is my revised code:
tar -cvf archive_name.tar $source_files