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

Re: What command to use to output to a text file?



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
>


Reply to: