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.
nautilus crash trash nautilus-actions
add a comment |
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.
nautilus crash trash nautilus-actions
3
I think command line tools will work much better than a file browser (but there are lighter file browsers thannautilus
, for examplepcmanfm
andthunar
). 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
add a comment |
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.
nautilus crash trash nautilus-actions
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
nautilus crash trash nautilus-actions
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 thannautilus
, for examplepcmanfm
andthunar
). 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
add a comment |
3
I think command line tools will work much better than a file browser (but there are lighter file browsers thannautilus
, for examplepcmanfm
andthunar
). 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
add a comment |
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
andsort
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
andless
ls | less
or if you want one file on each line
ls -1 | less
add a comment |
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
andsort
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
andless
ls | less
or if you want one file on each line
ls -1 | less
add a comment |
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
andsort
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
andless
ls | less
or if you want one file on each line
ls -1 | less
add a comment |
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
andsort
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
andless
ls | less
or if you want one file on each line
ls -1 | less
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
andsort
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
andless
ls | less
or if you want one file on each line
ls -1 | less
answered Nov 27 at 20:03
sudodus
22k32871
22k32871
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
3
I think command line tools will work much better than a file browser (but there are lighter file browsers than
nautilus
, for examplepcmanfm
andthunar
). 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