LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-10-2022, 06:47 AM   #1
postcd
Member
 
Registered: Oct 2013
Posts: 527

Rep: Reputation: Disabled
How to save terminal command output to a file (command > file) does not work


$ echo $0
Quote:
-bash
$ bash --version
Quote:
5.1.4
$ kstart5 plasmashell > file;cat file
Quote:
qt.qpa.qcb: could not .....
but that file does not contain anything. So how to save that output to a file please? Debian stable release. Thank you
 
Old 02-10-2022, 06:57 AM   #2
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,678

Rep: Reputation: Disabled
Most probably, kstart5 prints to standard error. Try
Code:
kstart5 plasmashell &>file

Last edited by shruggy; 02-10-2022 at 07:06 AM.
 
2 members found this post helpful.
Old 02-10-2022, 10:17 AM   #3
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,513

Rep: Reputation: Disabled
..or try with echo(?).
 
Old 02-10-2022, 10:49 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,742

Rep: Reputation: 7982Reputation: 7982Reputation: 7982Reputation: 7982Reputation: 7982Reputation: 7982Reputation: 7982Reputation: 7982Reputation: 7982Reputation: 7982Reputation: 7982
Quote:
Originally Posted by postcd View Post
$ echo $0
Code:
-bash
$ bash --version
Code:
5.1.4
$ kstart5 plasmashell > file;cat file
Code:
qt.qpa.qcb: could not .....
but that file does not contain anything. So how to save that output to a file please? Debian stable release. Thank you
May want to check one of your previous threads from several years ago, about stdout/stdin/stderr, where it covers the &, >, etc.:
https://www.linuxquestions.org/quest...le-4175607945/
 
1 members found this post helpful.
Old 02-10-2022, 12:09 PM   #5
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,151
Blog Entries: 6

Rep: Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835
Code:
ls -l &> myfile.txt
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] cant fix: "CLEAR: command not found" when trying to execute in terminal. "CLEAR" is part of code not the command to wipe the terminal screen Kintaro Linux - Newbie 12 08-03-2020 04:27 PM
LXer: How to Save the Terminal Output to a File in Linux LXer Syndicated Linux News 0 02-02-2020 05:03 AM
FATDOG64 - save file not showing its USB stick to save to. BW-userx Puppy 2 10-25-2016 10:02 AM
acer aspire one - does not connect to network, terminal does not work chcltd Linux - Laptop and Netbook 1 03-20-2009 10:05 AM
Does using the .Thuderbird file to save everything, not work in FC-6 royeo Linux - Newbie 1 03-03-2007 02:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration