UNIX question
Results 1 to 8 of 8

Thread: UNIX question

  1. #1

    UNIX question

    hi , I just wanna ask if it is possible to do this in UNIX: tar -xvfb 20 /dev/rct0

    and if not , where is the mistake?
    second what's the difference between * and $* in the begging of for when using sh?
    and last what 's doing
    echo ${d-$1} combined with a command procedure ?

    Last edited by [hack]supernova; January 18th, 2008 at 11:25 AM.

  2. #2
    Senior Member isildur's Avatar
    Join Date
    Feb 2003
    I will take a stab at the first question. You are ordering tar to extract a tar file, but what you are designating isn't one.
    Only trust Pipe-smoking Penguins.

  3. #3
    Senior Member Opus00's Avatar
    Join Date
    May 2005
    look into cpio
    There are two rules for success in life:
    Rule 1: Don't tell people everything you know.

  4. #4
    the 1st ok i did it , but what about the rest , I need some answers....

  5. #5
    Junior Member
    Join Date
    Sep 2005
    the first statement is basically a tar command used incorrectly
    you are probably trying to create a backup of a tape driver /dev/rct0.
    the b parameter specifies the block size which is 20 as mentioned.
    x is for extract.
    v is for verbose.

    tar -b 20 -cvvf bkp.tar /dev/rct0
    The above command would be more sensible.

    The $* is used to get in the arguments.
    $1 $2 etc.

    Read on Shell Scripting you will understand all the, or try reading on "regular expressions" Regex

  6. #6
    10x a lot. now if someone tell me what is doing this echo ${ d-$1 } everything will be perfect.

  7. #7
    Just Another Geek
    Join Date
    Jul 2002
    Rotterdam, Netherlands
    From man sh

    The syntax of the for command is:
    for variable [in word ...]
    do list
    $* Expands to the positional parameters, starting from one. When
    the expansion occurs within a double-quoted string it expands to
    a single field with the value of each parameter separated by the
    first character of the IFS variable, or by a space if IFS is
    Use Default Values. If parameter is unset or null, the expansion
    of word is substituted; otherwise, the value of parameter is sub-
    Oliver's Law:
    Experience is something you don't get until just after you need it.

  8. #8
    nice I'm so thankful for that.

Similar Threads

  1. Using Vim basics
    By gore in forum Other Tutorials Forum
    Replies: 10
    Last Post: March 28th, 2005, 07:38 AM
  2. Unix simple question
    By Delta4ce in forum Newbie Security Questions
    Replies: 7
    Last Post: June 29th, 2003, 08:01 AM
  3. Newbies, list of many words definitions.
    By -DaRK-RaiDeR- in forum Newbie Security Questions
    Replies: 9
    Last Post: December 14th, 2002, 07:38 PM
  4. The day unix died
    By khakisrule in forum Tech Humor
    Replies: 7
    Last Post: July 29th, 2002, 03:53 PM
  5. Test Your Knowledge of Redhat?
    By smirc in forum AntiOnline's General Chit Chat
    Replies: 3
    Last Post: May 13th, 2002, 03:24 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts