Re: insert file?

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

 



On Nov 28, 2007 1:00 PM, adrian kok <adriankok2000@xxxxxxxxxxxx> wrote:
> Thank you
>
> Additional question.
>
> When I have error in the console, but can't get from
> the log
>
> Can I capture an error to insert the file, no need to
> re-type it?
>
> Thank you
>

You can redirect errors using 2>.  If you want to append, then 2>>.

For example if you did the ls command below of a directory that had
files one.txt, two.txt and three.txt:

ls one.txt two.ttx three.txt

you will get an error for two.ttx.

You can redirect that using 2>
ls one.txt two.ttx three.txt 2>/dev/null
will redirect errors to /dev/null while stdout will still display to the screen.

ls one.txt two.ttx three.txt 2>lserrors.txt
will redirect errors to the file lserrors.txt while stdout will still
display to the screen.

ls one.txt two.ttx three.txt >goodfiles.txt 2>lserrors.txt
will redirect the errors to lserror.txt and will redirect the
successful part of the command to goodfiles.txt therefore you will
have no output to stdout.

Jacques B.

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux