What is the "-format" file ?

Discussion in 'Apple' started by Alan Browne, May 3, 2012.

  1. Alan Browne

    Alan Browne Guest

    There is a file called -format in my user folder

    Users/myaccountname/-folder

    It is largish at 9.15 GB.

    Does anyone know what it is? It was created recently.

    Thanks.
    --
    "A person with a new idea is a crank until the idea succeeds."
    -Samuel Clemens.
     
    1. Advertising

  2. Alan Browne

    Alan Browne Guest

    On 2012-05-03 17:05 , Alan Browne wrote:
    > There is a file called -format in my user folder
    >
    > Users/myaccountname/-folder


    er Users/myaccountname/-format

    >
    > It is largish at 9.15 GB.
    >
    > Does anyone know what it is? It was created recently.
    >
    > Thanks.



    --
    "A person with a new idea is a crank until the idea succeeds."
    -Samuel Clemens.
     
    1. Advertising

  3. Wes Groleau

    Wes Groleau Guest

    On 05-03-2012 17:05, Alan Browne wrote:
    > There is a file called -format in my user folder
    >
    > Users/myaccountname/-folder
    >
    > It is largish at 9.15 GB.
    >
    > Does anyone know what it is? It was created recently.


    Most likely the result of using -format as a command line option to a
    script or app which didn't recognize it and assumed it was a filename.

    --
    Wes Groleau

    “Beware the barrenness of a busy life.â€
    — Socrates
     
  4. Jim Gibson

    Jim Gibson Guest

    In article <>,
    Alan Browne <> wrote:

    > There is a file called -format in my user folder
    >
    > Users/myaccountname/-format (corrected in later post)
    >
    > It is largish at 9.15 GB.
    >
    > Does anyone know what it is? It was created recently.


    Try running the file utility on the file this way using the Terminal
    command-line in your home directory (where 'ls' shows the file):

    cat > file.txt
    -format
    ^D

    (where ^D is Control-D: holding the control key while typing d)

    file -f file.txt

    Note that the above manipulations are necessary because the string
    -format will be interpreted by most command-line utilities as an option
    and not as a file name. Even surrounding the string in quotes will not
    help, as that just protects the string from interpretation by the shell.
    Fortunately the file utility has the ability to read file names from an
    auxiliary file. Hence the above will work.
     
  5. Jim Gibson <> wrote:

    > Try running the file utility on the file this way using the Terminal
    > command-line in your home directory (where 'ls' shows the file):
    >
    > cat > file.txt
    > -format
    > ^D
    >
    > (where ^D is Control-D: holding the control key while typing d)
    >
    > file -f file.txt
    >
    > Note that the above manipulations are necessary because the string
    > -format will be interpreted by most command-line utilities as an option
    > and not as a file name. Even surrounding the string in quotes will not
    > help, as that just protects the string from interpretation by the shell.
    > Fortunately the file utility has the ability to read file names from an
    > auxiliary file. Hence the above will work.


    A much simpler workaround to avoid unintended interpretation of file
    names like that as switches is to use a pathname instead of a simple
    file name. In this case, do something like

    file ./-format

    where the "." means current directory. This trick of prefixing a file
    name with "./" to specify it as a path gets used in lots of contexts.
    For example, that's the usual trick to run an executable from the
    current directory if you avoid having the current directory in your PATH
    environment variable. This is done a lot by people doing development
    work.

    --
    Richard Maine | Good judgment comes from experience;
    email: last name at domain . net | experience comes from bad judgment.
    domain: summertriangle | -- Mark Twain
     
  6. Jim Gibson

    Jim Gibson Guest

    In article <1kjkg7v.jeejrp1jht36qN%>,
    ure (Richard Maine) wrote:

    > Jim Gibson <> wrote:
    >
    > > Try running the file utility on the file this way using the Terminal
    > > command-line in your home directory (where 'ls' shows the file):
    > >
    > > cat > file.txt
    > > -format
    > > ^D
    > >
    > > (where ^D is Control-D: holding the control key while typing d)
    > >
    > > file -f file.txt
    > >
    > > Note that the above manipulations are necessary because the string
    > > -format will be interpreted by most command-line utilities as an option
    > > and not as a file name. Even surrounding the string in quotes will not
    > > help, as that just protects the string from interpretation by the shell.
    > > Fortunately the file utility has the ability to read file names from an
    > > auxiliary file. Hence the above will work.

    >
    > A much simpler workaround to avoid unintended interpretation of file
    > names like that as switches is to use a pathname instead of a simple
    > file name. In this case, do something like
    >
    > file ./-format
    >
    > where the "." means current directory. This trick of prefixing a file
    > name with "./" to specify it as a path gets used in lots of contexts.
    > For example, that's the usual trick to run an executable from the
    > current directory if you avoid having the current directory in your PATH
    > environment variable. This is done a lot by people doing development
    > work.


    Thanks, I should have thought of that approach. Another method would be
    to use the full path (' file /User/myname/-format'), which is easy to do
    in Terminal by typing 'file ' (with a space) and then dragging an icon
    of the file from a Finder window into the Terminal window.
     
  7. Alan Browne

    Alan Browne Guest

    On 2012-05-03 18:17 , Jolly Roger wrote:
    > In article <>,
    > Alan Browne <> wrote:
    >
    >> There is a file called -format in my user folder
    >>
    >> Users/myaccountname/-folder
    >>
    >> It is largish at 9.15 GB.
    >>
    >> Does anyone know what it is? It was created recently.
    >>
    >> Thanks.

    >
    > I'm wondering if it's the result of some command line you issued. What
    > does file /Users/myaccountname/-format tell you about it? How about head
    > /Users/myaccountname/-format?


    Ah, you got me going down the right path.

    Finally got a peek inside the file ( { more < -format } as { more
    "-format" } did not work ).

    Lots of JPEG-ish 'binary' punctuated with occasional text filenames.

    Remember my question about xtar (that nobody replied to)?

    Those correspond to filenames from an external disk folder that I was
    attempting to span onto DVD using tar (did not work - but did run and
    consume CPU for a while before I clobbered it after realizing it was not
    writing to DVD).

    The subdir in WinXP had about 20 GB in it. The date of -format seems
    about right as I was looking up tar commands on the same date in Chrome
    and that shows in Chrome's history.

    How it got the name "-format" is still a mystery as that was not in the
    command line. Maybe a temp file from VMWare Fusion.

    Deleted it.

    --
    "A person with a new idea is a crank until the idea succeeds."
    -Samuel Clemens.
     
  8. Alan Browne

    Alan Browne Guest

    On 2012-05-04 13:16 , Jim Gibson wrote:
    > In article <>,
    > Alan Browne <> wrote:
    >
    >> There is a file called -format in my user folder
    >>
    >> Users/myaccountname/-format (corrected in later post)
    >>
    >> It is largish at 9.15 GB.
    >>
    >> Does anyone know what it is? It was created recently.

    <snip>


    > Note that the above manipulations are necessary because the string
    > -format will be interpreted by most command-line utilities as an option
    > and not as a file name. Even surrounding the string in quotes will not
    > help, as that just protects the string from interpretation by the shell.


    Already saw that - see my other post. To list the file I used:

    more < -format

    Showing it to be a file composed of JPEG files.

    (See my other post).


    --
    "A person with a new idea is a crank until the idea succeeds."
    -Samuel Clemens.
     
  9. Alan Browne

    Alan Browne Guest

    On 2012-05-04 13:46 , Richard Maine wrote:
    > Jim Gibson <> wrote:
    >
    >> Try running the file utility on the file this way using the Terminal
    >> command-line in your home directory (where 'ls' shows the file):
    >>
    >> cat > file.txt
    >> -format
    >> ^D
    >>
    >> (where ^D is Control-D: holding the control key while typing d)
    >>
    >> file -f file.txt
    >>
    >> Note that the above manipulations are necessary because the string
    >> -format will be interpreted by most command-line utilities as an option
    >> and not as a file name. Even surrounding the string in quotes will not
    >> help, as that just protects the string from interpretation by the shell.
    >> Fortunately the file utility has the ability to read file names from an
    >> auxiliary file. Hence the above will work.

    >
    > A much simpler workaround to avoid unintended interpretation of file
    > names like that as switches is to use a pathname instead of a simple
    > file name. In this case, do something like
    >
    > file ./-format
    >
    > where the "." means current directory. This trick of prefixing a file
    > name with "./" to specify it as a path gets used in lots of contexts.
    > For example, that's the usual trick to run an executable from the
    > current directory if you avoid having the current directory in your PATH
    > environment variable. This is done a lot by people doing development
    > work.


    Great! Solves it (see my reply to JR). (I listed the file to terminal
    to get an idea of the contents using: more < -format to get around
    the "-". Details in reply to JR.

    But with the "file" command as you provide it proves it's what I
    suspected, a tar file that I intended to span onto several DVD's.

    result of file ./-format
    ../-format: POSIX tar archive

    Why it went where it went (prep for burn to DVD?) and why it was named
    "-format" are two left over mysteries.

    Deleted.

    Thanks JR, Jim and Richard.

    --
    "A person with a new idea is a crank until the idea succeeds."
    -Samuel Clemens.
     
  10. Alan Browne

    Alan Browne Guest

    On 2012-05-04 17:05 , Alan Browne wrote:
    > On 2012-05-03 18:17 , Jolly Roger wrote:
    >> In article <>,
    >> Alan Browne <> wrote:
    >>
    >>> There is a file called -format in my user folder
    >>>
    >>> Users/myaccountname/-folder
    >>>
    >>> It is largish at 9.15 GB.
    >>>
    >>> Does anyone know what it is? It was created recently.
    >>>
    >>> Thanks.

    >>
    >> I'm wondering if it's the result of some command line you issued. What
    >> does file /Users/myaccountname/-format tell you about it? How about head
    >> /Users/myaccountname/-format?

    >
    > Ah, you got me going down the right path.
    >
    > Finally got a peek inside the file ( { more < -format } as { more
    > "-format" } did not work ).
    >
    > Lots of JPEG-ish 'binary' punctuated with occasional text filenames.
    >
    > Remember my question about xtar (that nobody replied to)?
    >
    > Those correspond to filenames from an external disk folder that I was
    > attempting to span onto DVD using tar (did not work - but did run and
    > consume CPU for a while before I clobbered it after realizing it was not
    > writing to DVD).
    >
    > The subdir in WinXP had about 20 GB in it. The date of -format seems


    (Let me clarify that - the folder I was working on had been copied out
    of the WinXP VM to an external disk)

    > about right as I was looking up tar commands on the same date in Chrome
    > and that shows in Chrome's history.
    >
    > How it got the name "-format" is still a mystery as that was not in the
    > command line. Maybe a temp file from VMWare Fusion.
    >
    > Deleted it.
    >



    --
    "A person with a new idea is a crank until the idea succeeds."
    -Samuel Clemens.
     
  11. Alan Browne

    Alan Browne Guest

    On 2012-05-03 17:05 , Alan Browne wrote:
    > There is a file called -format in my user folder
    >
    > Users/myaccountname/-folder
    >
    > It is largish at 9.15 GB.
    >
    > Does anyone know what it is? It was created recently.
    >
    > Thanks.



    In addition to the other snippets, the reply to my other post on stopped
    jobs would indicate that when I quit the tar I used ctrl-z rather than
    ctrl-c.

    Had I used ctrl-c would the in-process file have been deleted?

    --
    "A person with a new idea is a crank until the idea succeeds."
    -Samuel Clemens.
     
  12. In article <>,
    Alan Browne <> wrote:

    > On 2012-05-03 17:05 , Alan Browne wrote:
    > > There is a file called -format in my user folder
    > >
    > > Users/myaccountname/-folder
    > >
    > > It is largish at 9.15 GB.
    > >
    > > Does anyone know what it is? It was created recently.
    > >
    > > Thanks.

    >
    >
    > In addition to the other snippets, the reply to my other post on stopped
    > jobs would indicate that when I quit the tar I used ctrl-z rather than
    > ctrl-c.
    >
    > Had I used ctrl-c would the in-process file have been deleted?


    This doesn't seem like the name of a temporary file.

    My guess is that you were using a command that has a --format option,
    but you typed -format instead, and it was in a place where it expected a
    filename argument.

    --
    Barry Margolin,
    Arlington, MA
    *** PLEASE post questions in newsgroups, not directly to me ***
     
  13. Alan Browne

    Alan Browne Guest

    On 2012-05-04 19:07 , Barry Margolin wrote:
    > In article <>,
    > Alan Browne <> wrote:
    >
    >> On 2012-05-03 17:05 , Alan Browne wrote:
    >>> There is a file called -format in my user folder
    >>>
    >>> Users/myaccountname/-folder
    >>>
    >>> It is largish at 9.15 GB.
    >>>
    >>> Does anyone know what it is? It was created recently.
    >>>
    >>> Thanks.

    >>
    >>
    >> In addition to the other snippets, the reply to my other post on stopped
    >> jobs would indicate that when I quit the tar I used ctrl-z rather than
    >> ctrl-c.
    >>
    >> Had I used ctrl-c would the in-process file have been deleted?

    >
    > This doesn't seem like the name of a temporary file.
    >
    > My guess is that you were using a command that has a --format option,
    > but you typed -format instead, and it was in a place where it expected a
    > filename argument.


    No - I looked over the command I used (was still in the recall stack)
    and it did not use -format or anything remotely close.

    --
    "A person with a new idea is a crank until the idea succeeds."
    -Samuel Clemens.
     
  14. In article <>,
    Alan Browne <> wrote:

    > On 2012-05-04 19:07 , Barry Margolin wrote:
    > > In article <>,
    > > Alan Browne <> wrote:
    > >
    > >> On 2012-05-03 17:05 , Alan Browne wrote:
    > >>> There is a file called -format in my user folder
    > >>>
    > >>> Users/myaccountname/-folder
    > >>>
    > >>> It is largish at 9.15 GB.
    > >>>
    > >>> Does anyone know what it is? It was created recently.
    > >>>
    > >>> Thanks.
    > >>
    > >>
    > >> In addition to the other snippets, the reply to my other post on stopped
    > >> jobs would indicate that when I quit the tar I used ctrl-z rather than
    > >> ctrl-c.
    > >>
    > >> Had I used ctrl-c would the in-process file have been deleted?

    > >
    > > This doesn't seem like the name of a temporary file.
    > >
    > > My guess is that you were using a command that has a --format option,
    > > but you typed -format instead, and it was in a place where it expected a
    > > filename argument.

    >
    > No - I looked over the command I used (was still in the recall stack)
    > and it did not use -format or anything remotely close.


    What was the command?

    --
    Barry Margolin,
    Arlington, MA
    *** PLEASE post questions in newsgroups, not directly to me ***
     
  15. Alan Browne

    Alan Browne Guest

    On 2012-05-04 19:16 , Barry Margolin wrote:
    > In article <>,
    > Alan Browne <> wrote:
    >
    >> On 2012-05-04 19:07 , Barry Margolin wrote:
    >>> In article <>,
    >>> Alan Browne <> wrote:
    >>>
    >>>> On 2012-05-03 17:05 , Alan Browne wrote:
    >>>>> There is a file called -format in my user folder
    >>>>>
    >>>>> Users/myaccountname/-folder
    >>>>>
    >>>>> It is largish at 9.15 GB.
    >>>>>
    >>>>> Does anyone know what it is? It was created recently.
    >>>>>
    >>>>> Thanks.
    >>>>
    >>>>
    >>>> In addition to the other snippets, the reply to my other post on stopped
    >>>> jobs would indicate that when I quit the tar I used ctrl-z rather than
    >>>> ctrl-c.
    >>>>
    >>>> Had I used ctrl-c would the in-process file have been deleted?
    >>>
    >>> This doesn't seem like the name of a temporary file.
    >>>
    >>> My guess is that you were using a command that has a --format option,
    >>> but you typed -format instead, and it was in a place where it expected a
    >>> filename argument.

    >>
    >> No - I looked over the command I used (was still in the recall stack)
    >> and it did not use -format or anything remotely close.

    >
    > What was the command?


    What? You don't believe me?

    tar -cvpf /Volumes/multipartdvdbackup/backup.tar /Volumes/Transfer/Temp

    --
    "A person with a new idea is a crank until the idea succeeds."
    -Samuel Clemens.
     
  16. JF Mezei

    JF Mezei Guest

    Alan Browne wrote:

    > tar -cvpf /Volumes/multipartdvdbackup/backup.tar /Volumes/Transfer/Temp


    You forgot the -feathers in there :)

    Seriously, if you interrupted the process, it is quite likely that many
    stray temporary files would be left around. Your "-format" is likely
    one of them.

    Either that or Jolly Roger broke into your system and copied a big file
    to your home directory and named it -format just to confuse you to no
    end :)
     
  17. In article <>,
    Alan Browne <> wrote:

    > On 2012-05-04 19:16 , Barry Margolin wrote:
    > > In article <>,
    > > Alan Browne <> wrote:
    > >
    > >> On 2012-05-04 19:07 , Barry Margolin wrote:
    > >>> In article <>,
    > >>> Alan Browne <> wrote:
    > >>>
    > >>>> On 2012-05-03 17:05 , Alan Browne wrote:
    > >>>>> There is a file called -format in my user folder
    > >>>>>
    > >>>>> Users/myaccountname/-folder
    > >>>>>
    > >>>>> It is largish at 9.15 GB.
    > >>>>>
    > >>>>> Does anyone know what it is? It was created recently.
    > >>>>>
    > >>>>> Thanks.
    > >>>>
    > >>>>
    > >>>> In addition to the other snippets, the reply to my other post on stopped
    > >>>> jobs would indicate that when I quit the tar I used ctrl-z rather than
    > >>>> ctrl-c.
    > >>>>
    > >>>> Had I used ctrl-c would the in-process file have been deleted?
    > >>>
    > >>> This doesn't seem like the name of a temporary file.
    > >>>
    > >>> My guess is that you were using a command that has a --format option,
    > >>> but you typed -format instead, and it was in a place where it expected a
    > >>> filename argument.
    > >>
    > >> No - I looked over the command I used (was still in the recall stack)
    > >> and it did not use -format or anything remotely close.

    > >
    > > What was the command?

    >
    > What? You don't believe me?
    >
    > tar -cvpf /Volumes/multipartdvdbackup/backup.tar /Volumes/Transfer/Temp


    I don't believe that that command would have created a file named
    -format. The only file that command should create is the backup.tar
    file. It has no need to make a temporary file before writing to that
    file, it can just open backup.tar and start writing to it as it goes.

    I thought you mentioned "xtar" in an earlier message in the thread.

    --
    Barry Margolin,
    Arlington, MA
    *** PLEASE post questions in newsgroups, not directly to me ***
     
  18. In article <4fa46859$0$2194$c3e8da3$>,
    JF Mezei <> wrote:

    > Alan Browne wrote:
    >
    > > tar -cvpf /Volumes/multipartdvdbackup/backup.tar /Volumes/Transfer/Temp

    >
    > You forgot the -feathers in there :)
    >
    > Seriously, if you interrupted the process, it is quite likely that many
    > stray temporary files would be left around. Your "-format" is likely
    > one of them.


    Why do you think tar needs to create any temporary files? All it does
    is read each file in the source directory and append them to the
    backup.tar file, with appropriate metadata headers at the beginning of
    each.

    If it did need to create temporary files, I'd expect them to be in /tmp,
    not the home directory.

    --
    Barry Margolin,
    Arlington, MA
    *** PLEASE post questions in newsgroups, not directly to me ***
     
  19. Wes Groleau

    Wes Groleau Guest

    On 05-04-2012 13:16, Jim Gibson wrote:
    > Try running the file utility on the file this way using the Terminal
    > command-line in your home directory (where 'ls' shows the file):
    >
    > cat> file.txt
    > -format
    > ^D


    Not quite. cat > file.txt makes everything you type until ^D go into
    file.txt.

    iMac:~ wgroleau$ cat > file.txt
    -format
    iMac:~ wgroleau$ file file.txt
    file.txt: ASCII text
    iMac:~ wgroleau$ cat file.txt
    -format

    But you can use ./-format as Richard mentioned.

    Another trick is to use a command that doesn't allow options after a
    filename, and put another filename in front of the weird one.

    iMac:~ wgroleau$ mkdir garbage
    iMac:~ wgroleau$ echo "stuff" > -format
    iMac:~ wgroleau$ file -format
    file: Cannot open `ormat' (No such file or directory).
    iMac:~ wgroleau$ file ./-format
    ../-format: ASCII text
    iMac:~ wgroleau$ touch junk
    iMac:~ wgroleau$ mv junk -format garbage
    iMac:~ wgroleau$ ls garbage
    -format junk
    iMac:~ wgroleau$ rm -rf garbage


    --
    Wes Groleau

    “A miracle is a violation of the laws of nature, and as a
    firm and unalterable experience has established these laws,
    the proof against a miracle, from the very nature of the fact,
    is as entire as could possibly be imagined.â€
    — David Hume, age 37
    “There's no such thing of that, 'cause I never heard of it.â€
    — Becky Groleau, age 4
     
  20. Wes Groleau

    Wes Groleau Guest

    On 05-04-2012 19:09, Alan Browne wrote:
    >> My guess is that you were using a command that has a --format option,
    >> but you typed -format instead, and it was in a place where it expected a
    >> filename argument.

    >
    > No - I looked over the command I used (was still in the recall stack)
    > and it did not use -format or anything remotely close.


    Perhaps some script has a typo?

    Another way to do it is

    mv /Volumes/multipartdvdbackup/backup.tar -format

    but it's hard to imagine you doing that without knowing it.

    --
    Wes Groleau

    “Beware the barrenness of a busy life.â€
    — Socrates
     
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    8
    Views:
    4,466
    Earl F. Parrish
    Jul 31, 2006
  2. J.Clarke

    vcr file format

    J.Clarke, Jun 24, 2003, in forum: ATI
    Replies:
    5
    Views:
    3,630
    Nicholes Tse
    Jul 3, 2003
  3. Chris
    Replies:
    1
    Views:
    357
    Vadim Borshchev
    Sep 7, 2004
  4. Replies:
    1
    Views:
    435
    Quaoar
    Oct 10, 2006
  5. TBone
    Replies:
    1
    Views:
    713
    THANKJUS
    Aug 12, 2007
Loading...

Share This Page