Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ImageTool

一个磁盘映像操作工具

stars forks license release

注意:写入大于分区剩余空间大小的文件可能会导致分区损坏

格式

命令格式

imagetool.exe <FILE> [COMMAND]
  • FILE: 映像的路径

  • COMMAND: 命令

    • new 创建映像

      Usage: imagetool.exe <FILE> new --size <SIZE>
      
      Options:
      -s, --size <SIZE>  size of disk
      -h, --help         Print help
      

      示例

        imgtool hd.img new 1474560 #创建1.44MB大小的磁盘映像
      
    • create 创建文件

      Usage: imagetool.exe <FILE> create <FILE_PATH>
      
      Arguments:
      <FILE_PATH>  path with file name
      

      示例

        imgtool hd.img create /p0/text.txt #在第一个分区的根目录中创建文件text.txt
      
    • delete 删除文件

      Usage: imagetool.exe <FILE> delete <FILE_PATH>
      
      Arguments:
        <FILE_PATH>  file path
      

      示例

      imgtool hd.img delete /p0/text.txt #在第一个分区的根目录中删除文件text.txt
      
    • copy 将主机文件复制到映像

      imagetool.exe <FILE> copy [OPTIONS] --source <SOURCE> --target <TARGET>
      
      Options:
      -r, --recursive        copy directories recursively
      -s, --source <SOURCE>  host file
      -t, --target <TARGET>  dest file path with file name
      -h, --help             Print help
      

      示例

        imgtool hd.img copy file.txt /p0/file.txt #从主机中复制file.txt到第一个分区的根目录
        imgtool hd.img copy -r folder /p0/ #从主机中复制folder文件夹到第一个分区的根目录
      
    • mkdir 创建文件夹

      Usage: imagetool.exe <FILE> new --size <SIZE>
      
      Arguments:
        <DIR_PATH>  dir path
      

      示例

        imgtool hd.img mkdir folder /p0/dir #在第一个分区的根目录中创建文件夹dir
      

映像路径格式

/pN/....

N=分区号(从0开始)

About

A tool to operate disk image

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages