neo33
neo33

Reputation: 1879

how to send multiple files to a directory?

I am spliting a song into several parts using split as follows:

split --bytes=1000000 Sleep.mp3 size

and I get several parts like this:

sizeaa 

sizeab

sizeac

sizead

the issue comes when I try to send this files generated to a directory called song like this:

split --bytes=1000000 Sleep.mp3 size > song/

I get:

-bash: song/: Is a directory

I would like to appreciate a way to achieve this.

Upvotes: 2

Views: 62

Answers (3)

123
123

Reputation: 11216

Just put the directory as part of the output file

split --bytes=1000000 Sleep.mp3 song/size

Upvotes: 2

ojblass
ojblass

Reputation: 21620

I think you are going to have to do this in two commands:

split --bytes=1000000 Sleep.mp3 size
mv size* song

Upvotes: 0

contrapants
contrapants

Reputation: 793

Make your destination directory your working directory

cd song
split --bytes=1000000 ../Sleep.mp3 size

Upvotes: 2

Related Questions