#archive.org #internetarchive #ia #ubuntu #linux #cli

Install Command Line Tool:

  • pip install internetarchive --user


  • pip install --upgrade internetarchive --user


  • ia configure


  • ia upload <identifier>  file.mp3

Upload a folder with its content:

  • ia upload m2gin /home/user/test-dir

This will create /home/user/test-dir automatically in archive.org item.

  • ia upload m2gin /home/user/test-dir  --remote-name=sub/

This will transfer the files to /sub/home/user/test-dir in the collection

  • ia upload m2gin /home/test2/  --remote-name=sub2/

This will transfer only the content in local test4 folder (without path) to inside of sub2/ on archive.org.

Upload as single file to a subdirectory:

  • ia upload mbirgin  eb122.mp3  --remote-name=Enlem_ve_Boylam/eb122.mp3

Upload with metadata:

  • ia upload mbirgin  eb122.mp3  --remote-name=Enlem_ve_Boylam/eb122.mp3 --metadata="title:English Prepositions"

Upload Multiple Files by Looping

  • for c in {4..8}; do ia upload mbirgin $c.mp3  --remote-name=eb/$c.mp3 ; done;

List files in an item:

  • ia list  m2gin

List all available information about the files:

  • ia list --all m2gin

List only matched files:

  • ia list --glob auto/tongue-twister/tr/*.mp3  m2gin


  • ia delete <identifier> <file>

Delete a file and all files derived from the specified file:

  • ia delete <identifier> <file> --cascade
  • ia delete mbirgin Enlem_Ve_Boylam/test.mp3 --cascade

Find some files and delete them 

  • ia list --glob auto/tongue-twister/tr/*.mp3  m2gin | xargs -I {} ia delete m2gin {} --cascade

Copy & Move & Rename

  • ia copy <src-identifier>/<src-filename> <dest-identifier>/<dest-filename>
  • ia move m2gin/tekerleme2/mbirgin_-_tekerleme2_-_butesbihi.mp3  m2gin/site/tongue-twister/tr/mbirgin_-_tekerleme2_-_butesbihi.mp3

List some files and move them:

  • ia list --glob "tekerleme2/*.mp3"  m2gin | while read l; do n=${l/tekerleme2\//site/tongue-twister/tr/}; echo $l : $n; ia move m2gin/$l m2gin/$n;  done;

Reference: https://archive.org/services/docs/api/internetarchive/cli.html

Add to: