Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #236356 > unrolled thread

What command to use to output to a text file?

Started bySharon Kimble <boudiccas@skimble.plus.com>
First post2021-06-23 14:40 +0200
Last post2021-06-23 15:10 +0200
Articles 5 — 4 participants

Back to article view | Back to linux.debian.user


Contents

  What command to use to output to a text file? Sharon Kimble <boudiccas@skimble.plus.com> - 2021-06-23 14:40 +0200
    Re: What command to use to output to a text file? Andrei POPESCU <andreimpopescu@gmail.com> - 2021-06-23 15:10 +0200
      Re: What command to use to output to a text file? Jude DaShiell <jdashiel@panix.com> - 2021-06-23 16:50 +0200
      Re: What command to use to output to a text file? Sharon Kimble <boudiccas@skimble.plus.com> - 2021-06-23 16:50 +0200
    Re: What command to use to output to a text file? steve <dlist@bluewin.ch> - 2021-06-23 15:10 +0200

#236356 — What command to use to output to a text file?

FromSharon Kimble <boudiccas@skimble.plus.com>
Date2021-06-23 14:40 +0200
SubjectWhat command to use to output to a text file?
Message-ID<CtakG-6nm-5@gated-at.bofh.it>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512


I'm hoping that you folk can help me out of my predicament?

I have transferred some files in their directories to an external drive
mounted in a caddy.

How can I get a text file saved from an output of everything on the
drive, please? What commands do I need to use and what would be the
syntax of it/them please?

Thanks
    Sharon.    
- -- 
Debian 10.9, fluxbox 1.3.7, emacs 28.0.50, org 9.4.6
-----BEGIN PGP SIGNATURE-----

iQJPBAEBCgA5FiEELSc/6QwVBIYugJDbNoGAGQr4g1sFAmDTKswbHGJvdWRpY2Nh
c0Bza2ltYmxlLnBsdXMuY29tAAoJEDaBgBkK+INbOscP/3DG1JeKY3QL2erKFXxi
fcC98OyKOHO5jE5zgozRnHqoVCGiHHMwX8+Ij1Z0xxMj17GjZGALqCkca+M1QuDi
W8GUq9C2SWY85u4J/eQUoe829ERnd9xFG9ZarzlrqdwnN3/ASpWrRmknj8HV1JTb
laW5jlkxVnj1jYHvsqSMD8aBjVbG3niufS0fo9ScOwJFAxMLuvwjO9qYi/N8Ke8U
lCCA3NyfUZX3FJJh/j5/QUP4PXBWWylvBq4Am3HBAAs0IOWRtQKb6B6QnWAMys9W
6TJkMo8NFZiw01l3dh+9Wte2CcCy9B78481cuUdvu00jmVHBwqzRaEQCOW1ttHF3
yWnYLDDwlsizdtxOIg0FYsBhbCumWLJORe3U8TeF/pALWTJmZwZ759k4bidHCM5q
LwmaFmxNC81lLOnnKu4Isbrc4kjL6udIP73QCtvIMVcTLrwiIw000pbFkfrdD7Wv
PUOL2JSCb1qyJg4X82E9R42oseSTvZS0EE4kDJkeW1EU20fWA1xCKCnTNbCH3w9L
mQLgSNdRSINS1D34b/iy8Fqq/+8X+ycf0yrZKZraP9noNnB1nD/ZzM/EdFE7UrIz
7N5Nv220I0yuBq4CjDQhhNlt9kptVxA1nEGd4s/jXpfnrxzWB/6OP55PM9NMtOE/
0H8Ne800WqUuauPrs0/9ctb2
=F5HL
-----END PGP SIGNATURE-----

[toc] | [next] | [standalone]


#236359

FromAndrei POPESCU <andreimpopescu@gmail.com>
Date2021-06-23 15:10 +0200
Message-ID<CtaNH-6Mu-3@gated-at.bofh.it>
In reply to#236356

[Multipart message — attachments visible in raw view] — view raw

On Mi, 23 iun 21, 13:36:27, Sharon Kimble wrote:
> 
> I'm hoping that you folk can help me out of my predicament?
> 
> I have transferred some files in their directories to an external drive
> mounted in a caddy.
> 
> How can I get a text file saved from an output of everything on the
> drive, please? What commands do I need to use and what would be the
> syntax of it/them please?

It's unclear what information you expect to have in the text file, 
please elaborate on that (preferably with examples).

For a simple listing of files with full path something like below should 
do what you want:

    cd /path/to/external_drive
    find > files_on_external_drive.txt


Hope this helps,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser

[toc] | [prev] | [next] | [standalone]


#236372

FromJude DaShiell <jdashiel@panix.com>
Date2021-06-23 16:50 +0200
Message-ID<Ctcmu-7x4-9@gated-at.bofh.it>
In reply to#236359
ls could be used with the following suffix:
ls <target-dir> | tee -f listing.txt


On Wed, 23 Jun 2021, Andrei POPESCU wrote:

> On Mi, 23 iun 21, 13:36:27, Sharon Kimble wrote:
> >
> > I'm hoping that you folk can help me out of my predicament?
> >
> > I have transferred some files in their directories to an external drive
> > mounted in a caddy.
> >
> > How can I get a text file saved from an output of everything on the
> > drive, please? What commands do I need to use and what would be the
> > syntax of it/them please?
>
> It's unclear what information you expect to have in the text file,
> please elaborate on that (preferably with examples).
>
> For a simple listing of files with full path something like below should
> do what you want:
>
>     cd /path/to/external_drive
>     find > files_on_external_drive.txt
>
>
> Hope this helps,
> Andrei
>

[toc] | [prev] | [next] | [standalone]


#236374

FromSharon Kimble <boudiccas@skimble.plus.com>
Date2021-06-23 16:50 +0200
Message-ID<Ctcmu-7x4-15@gated-at.bofh.it>
In reply to#236359
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Andrei POPESCU <andreimpopescu@gmail.com> writes:

> On Mi, 23 iun 21, 13:36:27, Sharon Kimble wrote:
>> 
>> I'm hoping that you folk can help me out of my predicament?
>> 
>> I have transferred some files in their directories to an external drive
>> mounted in a caddy.
>> 
>> How can I get a text file saved from an output of everything on the
>> drive, please? What commands do I need to use and what would be the
>> syntax of it/them please?
>
> It's unclear what information you expect to have in the text file, 
> please elaborate on that (preferably with examples).
>
> For a simple listing of files with full path something like below should 
> do what you want:
>
>     cd /path/to/external_drive
>     find > files_on_external_drive.txt
>
>
> Hope this helps,
> Andrei

Thank you very much Andrei, this solved the problem very easily.

Thanks
    Sharon.
- -- 
Debian 10.9, fluxbox 1.3.7, emacs 28.0.50, org 9.4.6
-----BEGIN PGP SIGNATURE-----

iQJPBAEBCgA5FiEELSc/6QwVBIYugJDbNoGAGQr4g1sFAmDTR84bHGJvdWRpY2Nh
c0Bza2ltYmxlLnBsdXMuY29tAAoJEDaBgBkK+INb9NIQAJ1WLIU3AHdkLwaeQCfi
XsKotWSL7G/PSoKkY9RrWP5AYu2h/WP7PnvrvnLmWathRDtCmDvrU1qYCJkBQekJ
/0huBo/Frdlf8w2Zy2nVUL6x/bmLuzsA5+MPXAhknxpAaXfhUQg+tDww3yVxe7Lq
UTSPjfgyKNHN9ryKQdvh068jOjJgsih5aJ18wNHjzd6mBG/skonOmwQOewKGbwHJ
xeZ228MgzMGFsi7HRUKYDEPe2uqBHAdrRu6pi9v/ghMRYZoPMpRMjiXrKMEmJ39G
FrEyg0CxzrxYntSG6KQEyHQSFH5fyeZbw3jHy2VeOKYP+QNYB+2qk3a6DjZplRMs
VbLqzZY2fg2QT+ErFYP1SBKMGJpkRSsfbAGzo9iUSt/0ywAfWC+CX42YDaeZSML8
4xLLN5MVh5psgeqKKESFkIob/FD44x2agxxb7D8e2/3urpan26vGBlzrCHiby1SE
D0AkIMw558yGlBTZhMKlB6GkCtzDaZ9UhP2Nm7M2LN/lfSWQf8IU6ymEeP3nEPrJ
yvKIZYchjCRmp0WjsJATXeLp9Q9/gGnnqw+lIPlit3TeHb9sZo9KMPqGcWfmsUJ2
eD6vCBvwTDzAXCcrFmn0mO9WwkPia9yC3lDjhP31OLX9mhvp2FU8KyK3heuEd+rJ
La1yzNPqS6F44KFoO04lacSO
=JKFR
-----END PGP SIGNATURE-----

[toc] | [prev] | [next] | [standalone]


#236360

Fromsteve <dlist@bluewin.ch>
Date2021-06-23 15:10 +0200
Message-ID<CtaNI-6Mu-7@gated-at.bofh.it>
In reply to#236356
Hi,

>How can I get a text file saved from an output of everything on the
>drive, please? What commands do I need to use and what would be the
>syntax of it/them please?

Not sure I understand perfectly, but for example with

ls -l > my_text_file.txt

you will get the output of 'ls -l' in the file my_text_file.txt

The '>' does the trick.

If you want to append some text to an already existing file, use '>>'.

Hope that helps.

Best

Steve

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web