On Thu, 01 Jul 2004 22:28:23 -0400, Bruce Hunter <[EMAIL PROTECTED]> wrote: > > Thanks, I got it to work. How would I include the current system date > like this. > > #tar -cvf Solisix-$USER.tar Solisix/ <--- with current user.. > > I want the date instead.. > > #tar -cvf Solisix-$date.tar Solisix/ <-- doesn't work > > I'm still learning.. sorry >
What you're doing when you do $USER is bringing in one of the environment variables. If you type 'env' at a command prompt, you'll see the ones currently defined. The date isn't one of them. There might be an easier/better way but I would suggest running the 'date' command inline with the ` character as so: tar -cvf Solisix-`date '+%d%m%Y'`.tar Solisix That runs the 'date' command with a particular formatting string and then puts that result into the tar command. --roop _______________________________________________ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"