Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Vulcans worship peace above all. -- McCoy, "Return to Tomorrow", stardate 4768.3


computers / alt.os.linux.mint / ls > somefile.txt made to go to read sub-folder contents?

SubjectAuthor
* ls > somefile.txt made to go to read sub-folder contents?azigni
+- Re: ls > somefile.txt made to go to read sub-folder contents?Paul
+* Re: ls > somefile.txt made to go to read sub-folder contents?Big Al
|`- Re: ls > somefile.txt made to go to read sub-folder contents?Gordon
`- Re: ls > somefile.txt made to go to read sub-folder contents?Kirk_Rockstein

1
ls > somefile.txt made to go to read sub-folder contents?

<t1YXN.11368$yT%1.4381@fx33.iad>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=8366&group=alt.os.linux.mint#8366

  copy link   Newsgroups: alt.os.linux.mint
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!193.141.40.65.MISMATCH!npeer.as286.net!npeer-ng0.as286.net!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx33.iad.POSTED!not-for-mail
From: azigni@yahoo.com (azigni)
Subject: ls > somefile.txt made to go to read sub-folder contents?
Newsgroups: alt.os.linux.mint
MIME-Version: 1.0
User-Agent: Pan/0.154 (Izium; 517acf4)
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Lines: 16
Message-ID: <t1YXN.11368$yT%1.4381@fx33.iad>
X-Complaints-To: abuse@easynews.com
Organization: Easynews - www.easynews.com
X-Complaints-Info: Please be sure to forward a copy of ALL headers otherwise we will be unable to process your complaint properly.
Date: Tue, 30 Apr 2024 01:43:53 GMT
X-Received-Bytes: 1266
 by: azigni - Tue, 30 Apr 2024 01:43 UTC

Hello,

I know this command ls > somefile.txt reads the contents of a folder and
outputs it to somefile.txt.

I have so far, 6.x folders of ripped mp3's from my music collection and I
would like to print out the contents of each folder under the main
folders.

The folder tree is something like this: Music1/EasyListening/several
directories of albums/the songs they each contain.

What do I need to modify the ls output command to to to have it read sub-
folders, sub-sub folders and print out those file names?

Thanks in advance!

Re: ls > somefile.txt made to go to read sub-folder contents?

<v0pjg3$26v60$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=8367&group=alt.os.linux.mint#8367

  copy link   Newsgroups: alt.os.linux.mint
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: nospam@needed.invalid (Paul)
Newsgroups: alt.os.linux.mint
Subject: Re: ls > somefile.txt made to go to read sub-folder contents?
Date: Mon, 29 Apr 2024 22:02:41 -0400
Organization: A noiseless patient Spider
Lines: 84
Message-ID: <v0pjg3$26v60$1@dont-email.me>
References: <t1YXN.11368$yT%1.4381@fx33.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 30 Apr 2024 04:02:43 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="4ecc56b923656f32f3bf7ffb4bcd5790";
logging-data="2325696"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19x89X8L9z6KcRT8pXsYI4Ez0trwk7gEVs="
User-Agent: Ratcatcher/2.0.0.25 (Windows/20130802)
Cancel-Lock: sha1:iIvc6GkMYeNBv9Ovk+a7aNOkzys=
In-Reply-To: <t1YXN.11368$yT%1.4381@fx33.iad>
Content-Language: en-US
 by: Paul - Tue, 30 Apr 2024 02:02 UTC

On 4/29/2024 9:43 PM, azigni wrote:
> Hello,
>
> I know this command ls > somefile.txt reads the contents of a folder and
> outputs it to somefile.txt.
>
> I have so far, 6.x folders of ripped mp3's from my music collection and I
> would like to print out the contents of each folder under the main
> folders.
>
> The folder tree is something like this: Music1/EasyListening/several
> directories of albums/the songs they each contain.
>
> What do I need to modify the ls output command to to to have it read sub-
> folders, sub-sub folders and print out those file names?
>
> Thanks in advance!
>

You are looking for a "Recursive" option.

ls -R

That will list items below the current working directory.

If I include "1", that lists one item per line.

cd /mnt/d/easy

ls -1R
..:
FirstAlbum
SecondAlbum
ThirdAlbum

../FirstAlbum:
'01 Prime Time.m4a'
"02 Let's Talk About Me.m4a"
'03 Standing On Higher Ground.m4a'

../SecondAlbum:
'04 Stereotomy.m4a'
"05 Don't Answer Me.m4a"
'06 Limelight.m4a'

../ThirdAlbum:
'07 I Robot.m4a'
'08 What Goes Up.m4a'
SideTwo

../ThirdAlbum/SideTwo:
'09 Days Are Numbers (The Traveller).m4a'
'10 Ammonia Avenue.m4a'
'11 The Turn Of A Friendly Card (Pt. II).m4a'

You can also use commands such as Tree.

$ tree -a
..
├── FirstAlbum
│   ├── 01 Prime Time.m4a
│   ├── 02 Let's Talk About Me.m4a
│   └── 03 Standing On Higher Ground.m4a
├── SecondAlbum
│   ├── 04 Stereotomy.m4a
│   ├── 05 Don't Answer Me.m4a
│   └── 06 Limelight.m4a
└── ThirdAlbum
├── 07 I Robot.m4a
├── 08 What Goes Up.m4a
└── SideTwo
├── 09 Days Are Numbers (The Traveller).m4a
├── 10 Ammonia Avenue.m4a
└── 11 The Turn Of A Friendly Card (Pt. II).m4a

4 directories, 11 files

The listdir command is a little more ugly, because it
likes to refer to "." and ".." directories when it lists,
and this can deface the output.

Paul

Re: ls > somefile.txt made to go to read sub-folder contents?

<v0pmlk$27jjr$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=8368&group=alt.os.linux.mint#8368

  copy link   Newsgroups: alt.os.linux.mint
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: alan@invalid.com (Big Al)
Newsgroups: alt.os.linux.mint
Subject: Re: ls > somefile.txt made to go to read sub-folder contents?
Date: Mon, 29 Apr 2024 22:56:53 -0400
Organization: A noiseless patient Spider
Lines: 56
Message-ID: <v0pmlk$27jjr$1@dont-email.me>
References: <t1YXN.11368$yT%1.4381@fx33.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 30 Apr 2024 04:56:53 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="f67d7a2c11c9e3044a200e180f2829ea";
logging-data="2346619"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+d6O5b4fPo/ol41XviQOZT1vpe7owkaMo="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:F8UYLemrY4szngNElfPNGVBSb6o=
In-Reply-To: <t1YXN.11368$yT%1.4381@fx33.iad>
Content-Language: en-US
 by: Big Al - Tue, 30 Apr 2024 02:56 UTC

On 4/29/24 09:43 PM, azigni wrote:
> Hello,
>
> I know this command ls > somefile.txt reads the contents of a folder and
> outputs it to somefile.txt.
>
> I have so far, 6.x folders of ripped mp3's from my music collection and I
> would like to print out the contents of each folder under the main
> folders.
>
> The folder tree is something like this: Music1/EasyListening/several
> directories of albums/the songs they each contain.
>
> What do I need to modify the ls output command to to to have it read sub-
> folders, sub-sub folders and print out those file names?
>
> Thanks in advance!
If you have nemo actions installed, there is a right-click action to 'print tree'. Does a great
output to a html file if you can use that to print.
Directory Tree

[4.1k] /home/alan/Music
├── [3.1M] Formula 1 Theme.m4a
├── [2.8M] Prelude_Day_the_Earth_Stood_Still_1951.mp3
├── [ 29k] Playlist usr-share-sounds.xspf
├── [4.1k] Bedtime
│ ├── [8.3M] 224-Star Wars - Return of the Jedi, Victory Celebration-End Title.mp3
│ ├── [7.3M] 116-Crimson Tide Theme.mp3
│ ├── [7.1M] 196-Stars On 45 Oldies Collage 1.mp3
│ ├── [5.8M] 152-Queen Bohemian Rhapsody.mp3
│ ├── [5.7M] 184-Ringo Starr Oh My My.mp3
│ ├── [5.6M] 216-Star Wars - Duel of the Fates Suite.mp3
│ ├── [5.4M] 112-You've Got Mail Suite.mp3
│ ├── [5.4M] 220-Star Wars IV-A New Hope Ending Theme.mp3
│ ├── [4.9M] 124-Glenn Miller Orchestra Sing Sing Sing.mp3
│ ├── [4.6M] 156-Dirty Dancing I've Had The Time Of My Life.mp3
│ ├── [4.3M] 168-Irene Cara Flashdance What A Feeling.mp3
│ ├── [4.1M] 132-Francis Goya Song Of The Volga Boatman.mp3
│ ├── [3.9M] 128-Oak Ridge Boys Elvira.mp3
│ ├── [3.9M] 200-Ray Stevens Convoy.mp3
│ ├── [3.9M] 164-Christopher Cross Arthur's Theme (Best That You Can Do).mp3
│ ├── [3.8M] 148-Nobody Does It Better.mp3
│ ├── [3.8M] 172-Irene Cara Fame.mp3
│ ├── [3.6M] 136-Todd Rundgren Bang On The Drum All Day.mp3
│ ├── [3.5M] 236-Ray Stevens Everything Is Beautiful.mp3
│ ├── [3.5M] 144-Enrique Iglesias Rythm Divine.mp3
│ ├── [3.4M] 120-Paul Simon Kodachrome.mp3
│ ├── [3.2M] 208-Daniel Boone Beautiful Sunday.mp3
│ ├── [3.1M] 176-John Denver Thank God I'm A Country Boy.mp3
│ ├── [3.0M] 204-Trini Lopez If I Had A Hammer.mp3

ETC.
--
Linux Mint 21.3 Cinnamon 6.0.4 Kernel 5.15.0-105-generic
Al

Re: ls > somefile.txt made to go to read sub-folder contents?

<l9b8uvFohd0U1@mid.individual.net>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=8369&group=alt.os.linux.mint#8369

  copy link   Newsgroups: alt.os.linux.mint
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: Gordon@leaf.net.nz (Gordon)
Newsgroups: alt.os.linux.mint
Subject: Re: ls > somefile.txt made to go to read sub-folder contents?
Date: 30 Apr 2024 04:04:47 GMT
Lines: 55
Message-ID: <l9b8uvFohd0U1@mid.individual.net>
References: <t1YXN.11368$yT%1.4381@fx33.iad> <v0pmlk$27jjr$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: individual.net X/KReNCThvb/wUi2yRxZlAzJSxlzBZ9Y7iI1DKnnNVTRuqthEo
Cancel-Lock: sha1:HHc1UBNIHVWY8gfYCih2FXoudFY= sha256:mp++aCty4QbFauNF7fZxiuRVII8QS961rG+a1iXCL1E=
User-Agent: slrn/1.0.3 (Linux)
 by: Gordon - Tue, 30 Apr 2024 04:04 UTC

On 2024-04-30, Big Al <alan@invalid.com> wrote:
> On 4/29/24 09:43 PM, azigni wrote:
>> Hello,
>>
>> I know this command ls > somefile.txt reads the contents of a folder and
>> outputs it to somefile.txt.
>>
>> I have so far, 6.x folders of ripped mp3's from my music collection and I
>> would like to print out the contents of each folder under the main
>> folders.
>>
>> The folder tree is something like this: Music1/EasyListening/several
>> directories of albums/the songs they each contain.
>>
>> What do I need to modify the ls output command to to to have it read sub-
>> folders, sub-sub folders and print out those file names?
>>
>> Thanks in advance!
> If you have nemo actions installed, there is a right-click action to 'print tree'. Does a great
> output to a html file if you can use that to print.
> Directory Tree
>
> [4.1k] /home/alan/Music
> ├── [3.1M] Formula 1 Theme.m4a
> ├── [2.8M] Prelude_Day_the_Earth_Stood_Still_1951.mp3
> ├── [ 29k] Playlist usr-share-sounds.xspf
> ├── [4.1k] Bedtime
> │ ├── [8.3M] 224-Star Wars - Return of the Jedi, Victory Celebration-End Title.mp3
> │ ├── [7.3M] 116-Crimson Tide Theme.mp3
> │ ├── [7.1M] 196-Stars On 45 Oldies Collage 1.mp3
> │ ├── [5.8M] 152-Queen Bohemian Rhapsody.mp3
> │ ├── [5.7M] 184-Ringo Starr Oh My My.mp3
> │ ├── [5.6M] 216-Star Wars - Duel of the Fates Suite.mp3
> │ ├── [5.4M] 112-You've Got Mail Suite.mp3
> │ ├── [5.4M] 220-Star Wars IV-A New Hope Ending Theme.mp3
> │ ├── [4.9M] 124-Glenn Miller Orchestra Sing Sing Sing.mp3
> │ ├── [4.6M] 156-Dirty Dancing I've Had The Time Of My Life.mp3
> │ ├── [4.3M] 168-Irene Cara Flashdance What A Feeling.mp3
> │ ├── [4.1M] 132-Francis Goya Song Of The Volga Boatman.mp3
> │ ├── [3.9M] 128-Oak Ridge Boys Elvira.mp3
> │ ├── [3.9M] 200-Ray Stevens Convoy.mp3
> │ ├── [3.9M] 164-Christopher Cross Arthur's Theme (Best That You Can Do).mp3
> │ ├── [3.8M] 148-Nobody Does It Better.mp3
> │ ├── [3.8M] 172-Irene Cara Fame.mp3
> │ ├── [3.6M] 136-Todd Rundgren Bang On The Drum All Day.mp3
> │ ├── [3.5M] 236-Ray Stevens Everything Is Beautiful.mp3
> │ ├── [3.5M] 144-Enrique Iglesias Rythm Divine.mp3
> │ ├── [3.4M] 120-Paul Simon Kodachrome.mp3
> │ ├── [3.2M] 208-Daniel Boone Beautiful Sunday.mp3
> │ ├── [3.1M] 176-John Denver Thank God I'm A Country Boy.mp3
> │ ├── [3.0M] 204-Trini Lopez If I Had A Hammer.mp3
>
> ETC.

man tree for further info. on formating etc.

Re: ls > somefile.txt made to go to read sub-folder contents?

<l9v9d2Foq84U2@mid.individual.net>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=8382&group=alt.os.linux.mint#8382

  copy link   Newsgroups: alt.os.linux.mint
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: Kirk_Rockstein@nowhere.invalid (Kirk_Rockstein)
Newsgroups: alt.os.linux.mint
Subject: Re: ls > somefile.txt made to go to read sub-folder contents?
Date: 7 May 2024 18:14:59 GMT
Lines: 22
Message-ID: <l9v9d2Foq84U2@mid.individual.net>
References: <t1YXN.11368$yT%1.4381@fx33.iad>
X-Trace: individual.net tbCvSA6/NcS/OKuKqxvAoQEu30tRQUnH+7GexsQpHu6sLRwwTS
Cancel-Lock: sha1:boET7qYZSEE29OMyxX9SY9Y2Jqg= sha256:b2VPK+p/h6F6juMsCQbYQC6WU5gOlE0RYUdNdl3FlS8=
User-Agent: slrn/pre1.0.4-9/co (Crux)
 by: Kirk_Rockstein - Tue, 7 May 2024 18:14 UTC

On 2024-04-30, azigni <azigni@yahoo.com> wrote:
> Hello,
>
> I know this command ls > somefile.txt reads the contents of a folder and
> outputs it to somefile.txt.
>
> I have so far, 6.x folders of ripped mp3's from my music collection and I
> would like to print out the contents of each folder under the main
> folders.
>
> The folder tree is something like this: Music1/EasyListening/several
> directories of albums/the songs they each contain.
>
> What do I need to modify the ls output command to to to have it read sub-
> folders, sub-sub folders and print out those file names?
>
> Thanks in advance!

Open term/console and cd into top directory (Music1 ?)
and run:
find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g' > output.txt


computers / alt.os.linux.mint / ls > somefile.txt made to go to read sub-folder contents?

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor