Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then 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.
I'm assuming that by didn't work, you mean it put them in seperate folders. I don't know how to make it all untar into the same folder, but here's a script that will take the files from the seperate folder and put them all into one. Copy and paste the script below into a new text file (Leave out the lines that mark the beginning and the end) in the directory containing the directories your files were untarred into, call it something like move.sh. Then run "chmod u+x <name of script>" and then run "./<name of script>"
#This script takes files in all subdirectories of the current directory except DEST_DIR and copies them into DEST_DIR
DEST_DIR=all_files #Edit this to point to the folder you want
if [ -d $DEST_DIR ]
for file in *
if [ -d $file ]
if [ $file != $DEST_DIR ]
cp -R $file/* $DEST_DIR
echo "Error: $DEST_DIR does not exist or is not a directory."
echo "To set the destination directory, edit this $0 and set DEST_DIR."
I am a bash programmer in my spare time, I use it in the autopackage project.
ls -1 gives a list of each file on a newline, the wildcards (filename globbing) should be obvious, it's the same as in dos.
for varname in[list];
list is a string split using the contents of the IFS special variable, in this case set to a space, so this script will fail if any of the files have a space in the same. The backtick ` operator executes the command inside it and substitutes the output (in this case, the newlines are turned into spaces). Therefore varname is set to each file in turn.
tar xzvf $varname;
extracts the file and "done" indicates the end of the loop.