How To Easily Create Your Trade List In Linux

How To Create Your Trade List Easily In Linux Screen 1

If you find that you do not have lots of free time to create & maintain a list there are many quick and easy ways to make a list using your current directory structure. Apart from creating your list using Windows CMD or using “FilelistCreator” there is also a way to create your list in Linux. This tutorial will teach you how to create your trade list in Linux if you happen to be using it  instead of Windows.

Which Distro Will This Guide Work With?

If you use Linux often then you know there are numerous distros or distributions offered. Each distro may have unique codes used in the terminal. For this tutorial the method I’ll show you should work with ANY Linux distribution out of the box.

What Do I Need To Create My Trade List In Linux?

You will need the following things:

  • Knowledge of how to use a terminal in Linux
  • Your shows ordered in a directory of your choice. For this tutorial your shows can be on a external hard drive.
  • Each show in its own directory named how you prefer.

STEP 1:

Find the pathway to your folder with your shows. This is actually easier than you think. If you are unsure of the pathway then navigate to the folder that has your shows right click on it and choose “Open Terminal“.

How To Create Your Trade List Easily In Linux Screen 1

STEP 2:

When the terminal opens type in “pwd” and then hit enter. Then you will see your pathway results. As you can see I’m using an external hard drive to generate my list. Make a note of your pathway and move to the next step.

How To Create Your Trade List Easily In Linux Screen 2

STEP 3:

If your terminal is not opened already from finding your pathway, open your terminal. If you are not sure where it is you can usually find it in the Applications. If not ask at the developers web page or forum. I’m using Manjaro Linux so my terminal may vary from yours.

How To Create Your Trade List Easily In Linux Screen 1

STEP 4:

I’m going to break down the code so you can somewhat understand what its asking the PC to do. The generic code is shows below.

find /run/PATH/TO/YOUR/FILES -maxdepth 1 -type d -printf ‘%f\n’ | sort > /PATH/TO/YOUR/OUTPUT/FILE/NAME.txt

Take the pathway to your shows that you found above and replace the first bold red “PATH/TO/YOUR/FILES” with your actual pathway. So as you can see from the terminal screen shot above my shows are on an external hard drive so my pathway in this code would look like this:

find /run/media/herzeleidmeister/HD1/2.VIDEO -maxdepth 1 -type d -printf ‘%f\n’ | sort > /PATH/TO/YOUR/OUTPUT/FILE/NAME.txt

Now replace “/PATH/TO/YOUR/OUTPUT/FILE/NAME” with the directory you wish the generated file to be placed and choose a name for your file. So in my case I’ll name my file “VIDEO-BOOTLEGS-LIST-UPDATED-2022-07-11.txt“. And I wish to place my file in my delegated “-=TRADES=-” folder.

QUICK NOTE: You can find your pathway for your output folder the same way you found the directory that held your shows!

My final code will look like this:

find /run/media/herzeleidmeister/HD1/2.VIDEO -maxdepth 1 -type d -printf ‘%f\n’ | sort > /home/herzeleidmeister/Documents/-=TRADES=-/VIDEO-BOOTLEGS-LIST-UPDATED-2022-07-11.txt

CODE BREAKDOWN:

find /run/PATH/TO/YOUR/FILES -maxdepth 1 -type d -printf ‘%f\n’ | sort > /PATH/TO/YOUR/OUTPUT/FILE/NAME.txt

  1. find /run = This tells the terminal to find this info & run the code.
  2. /PATH/TO/YOUR/FILES = Is the pathway to your bootleg shows.
  3. -maxdepth 1 = This indicates that you only want to grab the top level directory names. I use this so I don’t end up with some shows split up into CD1, CD2 or DVD1, DVD2 etc. If you want to get directories past the top level then change the “1” to “2“, “3” or whatever level you want.
  4. -type d -printf ‘%f\n’ | = This bit of code tells your terminal what type & that the result should be printed. Its best not to mess with this bit as it works how it is unless you have greater knowledge of using the Linux terminal.
  5. sort > = This bit of code will sort the list in alphabetical order.
  6. /PATH/TO/YOUR/OUTPUT/FILE/NAME.txt = This is the pathway and file output name you wish to have.

STEP 5:

Once you get this code sorted, copy and paste it into the terminal and hit enter.This should generate your list for you.

How To Create Your Trade List Easily In Linux Screen 4

You can see by the little check mark on the far right side that my list is done generating. Your terminal may look different.

STEP 6:

And here is the result. Don’t forget to remove any portions from the list generation that do not belong. In my case I would remove the “2.VIDEO” at the top of the list.

How To Create Your Trade List Easily In Linux Screen 5

And there you have it! If you should run into problems or have any questions please post them as comments. I’ll do my best to answer them.

Share With Other Traders!
About HerzeleidMeister 19 Articles
HerzeleidMeister is a metal bootleg trader from Little Rock, Arkansas who has traded off and on for over 20 years. He enjoys sharing his knowledge & insights with other traders to help them with any trading hurdles they may have.

Be the first to comment

Leave a Reply

Your email address will not be published.


*