Most efficient way for handling multiple files











up vote
1
down vote

favorite












I am currently working on audio processing and I have many (approx 800) samples of 40s each. I am segmenting each file into roughly 8-12s clips based on ground truth data. This ends up creating 3200 files each time I run my code. Then I need to debug my code (if the audio isn't getting segmented satisfactorily). Nautilus hangs pretty often in this case. I have to delete permanently otherwise recycle bin crashes.


Can someone give me some useful tips and tricks to overcome/reduce this problem?


Edit : I normally do the following operations - sort by file size and play the largest file, delete all audio files if I find something wrong and see the file names in general if they are named as per requirement correctly.










share|improve this question




















  • 3




    I think command line tools will work much better than a file browser (but there are lighter file browsers than nautilus, for example pcmanfm and thunar). Command line tools: ls, find, cp, mv, rm. Please tell us which operations you need, and you can get detailed help.
    – sudodus
    Nov 27 at 16:27






  • 1




    Please check the edit
    – Red Floyd
    Nov 27 at 17:11















up vote
1
down vote

favorite












I am currently working on audio processing and I have many (approx 800) samples of 40s each. I am segmenting each file into roughly 8-12s clips based on ground truth data. This ends up creating 3200 files each time I run my code. Then I need to debug my code (if the audio isn't getting segmented satisfactorily). Nautilus hangs pretty often in this case. I have to delete permanently otherwise recycle bin crashes.


Can someone give me some useful tips and tricks to overcome/reduce this problem?


Edit : I normally do the following operations - sort by file size and play the largest file, delete all audio files if I find something wrong and see the file names in general if they are named as per requirement correctly.










share|improve this question




















  • 3




    I think command line tools will work much better than a file browser (but there are lighter file browsers than nautilus, for example pcmanfm and thunar). Command line tools: ls, find, cp, mv, rm. Please tell us which operations you need, and you can get detailed help.
    – sudodus
    Nov 27 at 16:27






  • 1




    Please check the edit
    – Red Floyd
    Nov 27 at 17:11













up vote
1
down vote

favorite









up vote
1
down vote

favorite











I am currently working on audio processing and I have many (approx 800) samples of 40s each. I am segmenting each file into roughly 8-12s clips based on ground truth data. This ends up creating 3200 files each time I run my code. Then I need to debug my code (if the audio isn't getting segmented satisfactorily). Nautilus hangs pretty often in this case. I have to delete permanently otherwise recycle bin crashes.


Can someone give me some useful tips and tricks to overcome/reduce this problem?


Edit : I normally do the following operations - sort by file size and play the largest file, delete all audio files if I find something wrong and see the file names in general if they are named as per requirement correctly.










share|improve this question















I am currently working on audio processing and I have many (approx 800) samples of 40s each. I am segmenting each file into roughly 8-12s clips based on ground truth data. This ends up creating 3200 files each time I run my code. Then I need to debug my code (if the audio isn't getting segmented satisfactorily). Nautilus hangs pretty often in this case. I have to delete permanently otherwise recycle bin crashes.


Can someone give me some useful tips and tricks to overcome/reduce this problem?


Edit : I normally do the following operations - sort by file size and play the largest file, delete all audio files if I find something wrong and see the file names in general if they are named as per requirement correctly.







nautilus crash trash nautilus-actions






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 27 at 17:10

























asked Nov 27 at 16:20









Red Floyd

1085




1085








  • 3




    I think command line tools will work much better than a file browser (but there are lighter file browsers than nautilus, for example pcmanfm and thunar). Command line tools: ls, find, cp, mv, rm. Please tell us which operations you need, and you can get detailed help.
    – sudodus
    Nov 27 at 16:27






  • 1




    Please check the edit
    – Red Floyd
    Nov 27 at 17:11














  • 3




    I think command line tools will work much better than a file browser (but there are lighter file browsers than nautilus, for example pcmanfm and thunar). Command line tools: ls, find, cp, mv, rm. Please tell us which operations you need, and you can get detailed help.
    – sudodus
    Nov 27 at 16:27






  • 1




    Please check the edit
    – Red Floyd
    Nov 27 at 17:11








3




3




I think command line tools will work much better than a file browser (but there are lighter file browsers than nautilus, for example pcmanfm and thunar). Command line tools: ls, find, cp, mv, rm. Please tell us which operations you need, and you can get detailed help.
– sudodus
Nov 27 at 16:27




I think command line tools will work much better than a file browser (but there are lighter file browsers than nautilus, for example pcmanfm and thunar). Command line tools: ls, find, cp, mv, rm. Please tell us which operations you need, and you can get detailed help.
– sudodus
Nov 27 at 16:27




1




1




Please check the edit
– Red Floyd
Nov 27 at 17:11




Please check the edit
– Red Floyd
Nov 27 at 17:11










1 Answer
1






active

oldest

votes

















up vote
1
down vote



accepted










Suggested tools





  • There are manuals in the operating system, for example



    man ls
    man find
    man sort
    man rm
    man less


  • Maybe you find it better to use tutorials, that you can find via the internet, for example via the search string linux less tutorial.


  • It is a good idea to have a clean dedicated directory or directory tree, with only the audio file clips, so that you need not worry about tampering with any other files, that you want to keep. It will make the commands simpler and easier to run.


  • It is possible to have other files there, but then you must specify the file type for the files that you want to manage, for example *.mp3.


  • In the following examples, I assume that you have a clean dedicated directory or directory tree, with only the audio file clips, and that all files, that you want to keep are outside that directory.


  • In a terminal window you can re-use commands via the 'up-arrow' key.


  • You can also create alias so that you can type very short commands and get the whole command, that will perform the action you want. More about that later if necessary.




You normally do the following operations






  • First you change directory to your dedicated directory



    cd /path-to-directory/


    for example



    cd $HOME/clips




  • sort by file size and play the largest file






    • ls if a flat structure (no subdirectories to search)



      ls -Sr



    • find and sort if there are subdirectories to search



      find -type f -printf "%st%pn"|sort -n



    will sort with the largest file last.





    • If you want to play that file directly in a flat structure, you can try with



      mplayer "$(ls -S|head -n1)"


      (or use some other player).







  • delete all audio files if you find something wrong





    • rm


    In a flat directory



        rm *


    or if there are subdirectories with files to delete



        rm -r *


    If there are other file types, that you want to keep, remove only the audio files for example mp3,



        rm *.mp3
    rm -r *.mp3




  • and see the file names in general if they are named as per requirement
    correctly.






    • ls and less



      ls | less


      or if you want one file on each line



      ls -1 | less









share|improve this answer





















    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "89"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1096545%2fmost-efficient-way-for-handling-multiple-files%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    1
    down vote



    accepted










    Suggested tools





    • There are manuals in the operating system, for example



      man ls
      man find
      man sort
      man rm
      man less


    • Maybe you find it better to use tutorials, that you can find via the internet, for example via the search string linux less tutorial.


    • It is a good idea to have a clean dedicated directory or directory tree, with only the audio file clips, so that you need not worry about tampering with any other files, that you want to keep. It will make the commands simpler and easier to run.


    • It is possible to have other files there, but then you must specify the file type for the files that you want to manage, for example *.mp3.


    • In the following examples, I assume that you have a clean dedicated directory or directory tree, with only the audio file clips, and that all files, that you want to keep are outside that directory.


    • In a terminal window you can re-use commands via the 'up-arrow' key.


    • You can also create alias so that you can type very short commands and get the whole command, that will perform the action you want. More about that later if necessary.




    You normally do the following operations






    • First you change directory to your dedicated directory



      cd /path-to-directory/


      for example



      cd $HOME/clips




    • sort by file size and play the largest file






      • ls if a flat structure (no subdirectories to search)



        ls -Sr



      • find and sort if there are subdirectories to search



        find -type f -printf "%st%pn"|sort -n



      will sort with the largest file last.





      • If you want to play that file directly in a flat structure, you can try with



        mplayer "$(ls -S|head -n1)"


        (or use some other player).







    • delete all audio files if you find something wrong





      • rm


      In a flat directory



          rm *


      or if there are subdirectories with files to delete



          rm -r *


      If there are other file types, that you want to keep, remove only the audio files for example mp3,



          rm *.mp3
      rm -r *.mp3




    • and see the file names in general if they are named as per requirement
      correctly.






      • ls and less



        ls | less


        or if you want one file on each line



        ls -1 | less









    share|improve this answer

























      up vote
      1
      down vote



      accepted










      Suggested tools





      • There are manuals in the operating system, for example



        man ls
        man find
        man sort
        man rm
        man less


      • Maybe you find it better to use tutorials, that you can find via the internet, for example via the search string linux less tutorial.


      • It is a good idea to have a clean dedicated directory or directory tree, with only the audio file clips, so that you need not worry about tampering with any other files, that you want to keep. It will make the commands simpler and easier to run.


      • It is possible to have other files there, but then you must specify the file type for the files that you want to manage, for example *.mp3.


      • In the following examples, I assume that you have a clean dedicated directory or directory tree, with only the audio file clips, and that all files, that you want to keep are outside that directory.


      • In a terminal window you can re-use commands via the 'up-arrow' key.


      • You can also create alias so that you can type very short commands and get the whole command, that will perform the action you want. More about that later if necessary.




      You normally do the following operations






      • First you change directory to your dedicated directory



        cd /path-to-directory/


        for example



        cd $HOME/clips




      • sort by file size and play the largest file






        • ls if a flat structure (no subdirectories to search)



          ls -Sr



        • find and sort if there are subdirectories to search



          find -type f -printf "%st%pn"|sort -n



        will sort with the largest file last.





        • If you want to play that file directly in a flat structure, you can try with



          mplayer "$(ls -S|head -n1)"


          (or use some other player).







      • delete all audio files if you find something wrong





        • rm


        In a flat directory



            rm *


        or if there are subdirectories with files to delete



            rm -r *


        If there are other file types, that you want to keep, remove only the audio files for example mp3,



            rm *.mp3
        rm -r *.mp3




      • and see the file names in general if they are named as per requirement
        correctly.






        • ls and less



          ls | less


          or if you want one file on each line



          ls -1 | less









      share|improve this answer























        up vote
        1
        down vote



        accepted







        up vote
        1
        down vote



        accepted






        Suggested tools





        • There are manuals in the operating system, for example



          man ls
          man find
          man sort
          man rm
          man less


        • Maybe you find it better to use tutorials, that you can find via the internet, for example via the search string linux less tutorial.


        • It is a good idea to have a clean dedicated directory or directory tree, with only the audio file clips, so that you need not worry about tampering with any other files, that you want to keep. It will make the commands simpler and easier to run.


        • It is possible to have other files there, but then you must specify the file type for the files that you want to manage, for example *.mp3.


        • In the following examples, I assume that you have a clean dedicated directory or directory tree, with only the audio file clips, and that all files, that you want to keep are outside that directory.


        • In a terminal window you can re-use commands via the 'up-arrow' key.


        • You can also create alias so that you can type very short commands and get the whole command, that will perform the action you want. More about that later if necessary.




        You normally do the following operations






        • First you change directory to your dedicated directory



          cd /path-to-directory/


          for example



          cd $HOME/clips




        • sort by file size and play the largest file






          • ls if a flat structure (no subdirectories to search)



            ls -Sr



          • find and sort if there are subdirectories to search



            find -type f -printf "%st%pn"|sort -n



          will sort with the largest file last.





          • If you want to play that file directly in a flat structure, you can try with



            mplayer "$(ls -S|head -n1)"


            (or use some other player).







        • delete all audio files if you find something wrong





          • rm


          In a flat directory



              rm *


          or if there are subdirectories with files to delete



              rm -r *


          If there are other file types, that you want to keep, remove only the audio files for example mp3,



              rm *.mp3
          rm -r *.mp3




        • and see the file names in general if they are named as per requirement
          correctly.






          • ls and less



            ls | less


            or if you want one file on each line



            ls -1 | less









        share|improve this answer












        Suggested tools





        • There are manuals in the operating system, for example



          man ls
          man find
          man sort
          man rm
          man less


        • Maybe you find it better to use tutorials, that you can find via the internet, for example via the search string linux less tutorial.


        • It is a good idea to have a clean dedicated directory or directory tree, with only the audio file clips, so that you need not worry about tampering with any other files, that you want to keep. It will make the commands simpler and easier to run.


        • It is possible to have other files there, but then you must specify the file type for the files that you want to manage, for example *.mp3.


        • In the following examples, I assume that you have a clean dedicated directory or directory tree, with only the audio file clips, and that all files, that you want to keep are outside that directory.


        • In a terminal window you can re-use commands via the 'up-arrow' key.


        • You can also create alias so that you can type very short commands and get the whole command, that will perform the action you want. More about that later if necessary.




        You normally do the following operations






        • First you change directory to your dedicated directory



          cd /path-to-directory/


          for example



          cd $HOME/clips




        • sort by file size and play the largest file






          • ls if a flat structure (no subdirectories to search)



            ls -Sr



          • find and sort if there are subdirectories to search



            find -type f -printf "%st%pn"|sort -n



          will sort with the largest file last.





          • If you want to play that file directly in a flat structure, you can try with



            mplayer "$(ls -S|head -n1)"


            (or use some other player).







        • delete all audio files if you find something wrong





          • rm


          In a flat directory



              rm *


          or if there are subdirectories with files to delete



              rm -r *


          If there are other file types, that you want to keep, remove only the audio files for example mp3,



              rm *.mp3
          rm -r *.mp3




        • and see the file names in general if they are named as per requirement
          correctly.






          • ls and less



            ls | less


            or if you want one file on each line



            ls -1 | less










        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 27 at 20:03









        sudodus

        22k32871




        22k32871






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Ask Ubuntu!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1096545%2fmost-efficient-way-for-handling-multiple-files%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

            Mangá

            Eduardo VII do Reino Unido