Re: help with output (for bug reports)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 16 Aug 2004 21:28:24 -0400, Jim Cornette
<fc-cornette@xxxxxxxxxxxxx> wrote:
> Timothy Payne wrote:
> > I filed a bug and they want some out put but I don't know how to get it
> > for them:
> >
> > Can you attach the output of lspci, and kudzu -p -c network?
> 
> I usually send the output to a file like my example below:
> 
> lspci >/home/myhome/lspci.txt

That's where sudo can come in handy.

It pays to know the order of operations one the cmd line, as the shell
interprets it.

sudo lspci -vvv >/tmp/lspci.txt

will create a file owned by you, not root.

The reason is order of operations.  first the shell sees the >, and so
it opens the /tmp/lspci.txt file for writing.  then, it tries to
execute the command.  Of course, this means that it creates/truncates
the file first, even before it knows if the command exists. 
therefore, the following still creates a file:

$ jfkldsjaklfdjsakljfdsa >/tmp/foo
bash: jfkldsjaklfdjsakljfdsa: command not found

but the /tmp/foo is still created.

   - Kevin



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux