(Ubuntu)文字乱码与格式化U盘

Contents

1 The encodings of Chinese charactors .

2 Format a sdcard using fdisk command 



一 解决svn上ReleaseNote乱码问题记录

  最近在利用SVN发布版本中出现一个重大的问题,发布版本应该是发布者从trunk中取出需要发布的版本代码然后建立branch(如果自认为可以设立tag就可以建立tag)后,需要填写releaseNote,之后开发者通过阅读releaseNote知道这次发布的内容有哪些,确认这些信息后,既可以提交给测试部门进行测试,但是因为很多发布者记录releaseNote的平台是在windows下书写的,但是Ubuntu10.10系统中打开文件,显示的全部都是乱码,其实乱码主要是因为字符编码不同引起的,所以这个地方主要解决的是字符编码的问题,因为我按装的系统用的是English(United States) 的显示格式,所以这里首先需要安装中文字体的语言支持,因为我需要做的项目有台湾和香港的,所以也需要繁体字的支持,安装完毕之后,可以通过两种方式来解决乱码问题,一种是通过修改*.txt打开方式为OpenOffice,选择Chinese GB18030的字符编码打开,第二种方式是通过修改当前用户(非root)用户的gedit的配置,通过Terminal 

$ gconf-editor

choice app-gedit2-preferences-encodings-add  GB18030, GBK, GB2312 三种编码方式 - close

再重新打开文档,就可以查看到了文档的内容信息了。


二 fdisk 用来格式化一个sdcard

这里有一个理解就是所有的linux指令应该都是英文单词的缩写,所以df应该是disk format

$ df  -h  

届时,会列举出所有的设备名称,找到需要format的那个设备列表,因为我的Ubuntu是10.10的,USB 会自动mount,当我需要format的时候把这个设备umount一下就好

选择你要的设备节点(设备节点如何理解?),然后执行fdisk ,此次我电脑显示我需要修改的设备节点是/dev/sdc1所以,我接下来使用

$sudo fisk /dev/sdc1

这里有一个地方需要说明的。只要不是用 /home/**/下目录的内容,一定要加上sudo 其次,这个地方要注意是在后面操作的时候出现的一些问题,不要误以为是整个系统的,应该只是这个分区内部的问题,简而言之,这个指令只会操作这个设备节点下的内容

m (可以通过输入他来得到相关的内容)

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (command 'c') and change display units to
         sectors (command 'u').


Command (m for help): m
Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)

通过 d 删除这个设备节点下所有的partions 然后再 n 一个新的partion,最后w

我的系统会自动挂载U盘,这个时候可以  sudo umount -v /dev/sdc1 (umount 不太清楚的在terminal中输入umount  回车 具体的options就会出来)

$ sudo mkfs -v vfat /dev/sdc1

将U盘 Convert to FAT format , and then mount the U disk on your specified folder (Here i support folder name is AndroidImg) 

$ cp ../**.img  ~/AndroidImg

Now , I have achieved my goal, 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值