CentOS挂载读写NTFS分区

CentOS不像Fedora和ubuntu等,默认是自动挂载NTFS的,而它可以利用NTFS-3G来实现挂载及读写。

NTFS-3G 是一个开源的软件,可以实现 Linux、Free BSD、Mac OSX、NetBSD 和 Haiku 等操作系统中的 NTFS 读写支持。它可以安全且快速地读写 Windows 系统的 NTFS 分区,而不用担心数据丢失。

本文讲解如何在CentOS安装NTFS-3G来实习那挂载NTFS分区。

首先必须安装了rpmforge软件库的源

1、下载rpmforge的rpm文件包

32位系统

[root@linuxsight linuxsight]#  wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-1.el6.rf.i686.rpm

64位系统

[root@linuxsight linuxsight]#  wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm

2、安装rpmforge的rpm文件包

[root@linuxsight linuxsight]#  rpm -ivh rpmforge-release-0.5.2-1.el6.rf.i686.rpm

3、安装ntfs-3g

[root@linuxsight linuxsight]# yum install fuse-ntfs-3g
Loaded plugins: fastestmirror, refresh-packagekit
Loading mirror speeds from cached hostfile
* base: mirrors.ta139.com
* extras: ftp.nara.wide.ad.jp
* rpmforge: apt.sw.be
* updates: mirrors.ta139.com
rpmforge                                                 | 1.1 kB     00:00
rpmforge/primary                                         | 1.3 MB     01:22
rpmforge                                                              3921/3921
Setting up Install Process
Package fuse-2.8.3-1.el6.i686 already installed and latest version
Resolving Dependencies
–> Running transaction check
—> Package fuse-ntfs-3g.i686 0:2010.10.2-1.el6.rf set to be updated
–> Finished Dependency Resolution

Dependencies Resolved

=====================================================
Package            Arch       Version                     Repository      Size
=====================================================
Installing:
fuse-ntfs-3g       i686       2010.10.2-1.el6.rf          rpmforge       637 k

Transaction Summary
=====================================================
Install       1 Package(s)
Upgrade       0 Package(s)

Total download size: 637 k
Installed size: 1.4 M
Is this ok [y/N]: y
Downloading Packages:
fuse-ntfs-3g-2010.10.2-1.el6.rf.i686.rpm                 | 637 kB     00:35
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
Installing     : fuse-ntfs-3g-2010.10.2-1.el6.rf.i686                     1/1

Installed:
fuse-ntfs-3g.i686 0:2010.10.2-1.el6.rf

Complete!

安卓手机内置存储卡数据恢复 | 手机数据恢复

        安卓手机内置一个Flash芯片,在上面划分了一些分区(boot system chche等),但有一个分区用户可以在这里存放自己的数据,例如个人照片、视频、录音、文件等,如果遭遇了数据丢失,可以把手机与电脑连接,如果可以识别出可移动设备随便找一个数据恢复软件就可以恢复,例如(DiskGenius、数据恢复精灵),但是如果检测到的不是可移动设备,或者在数据恢复软件中检测不到手机的内置存储卡怎么办呢?这个时候也就是恢复的难点了,经过几天的研究,此类的数据恢复已经成功。

Android Debug Bridge

概述
adb的全称为Android Debug Bridge,就是起到调试桥的作用。通过adb我们可以在Eclipse中方便通过DDMS来调试Android程序,说白了就是debug工具。adb的工作方式比较特殊,采用监听Socket TCP 5554等端口的方式让IDE和Qemu通讯,默认情况下adb会daemon相关的网络端口,所以当我们运行Eclipse时adb进程就会自动运行。
adb是android sdk里的一个工具, 用这个工具可以直接操作管理android模拟器或者真实的andriod设备(如G1手机).  它的主要功能有:
* 运行设备的shell(命令行)
* 管理模拟器或设备的端口映射
* 计算机和设备之间上传/下载文件
* 将本地apk软件安装至模拟器或android设备
ADB是一个 客户端-服务器端 程序, 其中客户端是你用来操作的电脑, 服务器端是android设备.
常用命令
[1]1. 查看设备 *adbdevices
这个命令是查看当前连接的设备, 连接到计算机的android设备或者模拟器将会列出显示
2. 安装软件
*adbinstall <apk文件路径>
这个命令将指定的apk文件安装到设备上
3. 卸载软件
*adbuninstall <软件名>
*adbuninstall -k <软件名>
如果加 -k 参数,为卸载软件但是保留配置和缓存文件.
4. 登录设备shell
*adbshell
*adbshell <command命令>
这个命令将登录设备的shell.
后面加<command命令>将是直接运行设备命令, 相当于执行远程命令
5. 从电脑上发送文件到设备
*adbpush <本地路径> <远程路径>
用push命令可以把本机电脑上的文件或者文件夹复制到设备(手机)
6. 从设备上下载文件到电脑
*adbpull <远程路径> <本地路径>
用pull命令可以把设备(手机)上的文件或者文件夹复制到本机电脑
7. 显示帮助信息
*adbhelp
这个命令将显示帮助信息
删除Android系统Rom自带的软件
Android系统没有卸载Rom自带软件的功能.可能有些同学很想删除废了武功的Youtube,想删除墙那边的Twitter.
加上Android的快捷方式没法修改没法自己排序没法分页.
安装的程序太多就会发现原来找到自己想要的东西很难.
综上所述,我觉得告知各位菜鸟同学如何删除自带的程序是很有必要的一件事情.
1.确定手机root了,取得了root权限才能删除系统文件呀.
2.下载Android_db.rar,解压到%windir/%System32下.
3.手机连接数据线,在电脑上打开cmd,然后输入命令
adb remount
adb shell
su
执行完成之后,你会看到:
* daemon not running. starting it now *
* daemon started successfully *
4.接着就是Linux命令行模式了,输入
cd system/app
你会发现没啥变化,然后输入ls回车.
这时候列表显示了system/app里面的所有文件,也就是Rom集成的一些软件了.
5.开始删除吧.比如删除Youtube,他的文件名是Youtube.odex和Youtube.apk
我们要删除这2个文件,敲入以下命令:
adb shell rm -f system/app/Youtube.odex
adb shell rm -f system/app/Youtube.apk

VC获取硬盘物理扇区与逻辑扇区大小

 

Used in conjunction with the IOCTL_STORAGE_QUERY_PROPERTY control code to retrieve the storage access alignment descriptor data for a device.

Syntax

Members

Version

Contains the size of this structure, in bytes. The value of this member will change as members are added to the structure.

Size

Specifies the total size of the data returned, in bytes. This may include data that follows this structure.

BytesPerCacheLine

The number of bytes in a cache line of the device.

BytesOffsetForCacheAlignment

The address offset necessary for proper cache access alignment, in bytes.

BytesPerLogicalSector

The number of bytes in a logical sector of the device.

BytesPerPhysicalSector

The number of bytes in a physical sector of the device.

BytesOffsetForSectorAlignment

The logical sector offset within the first physical sector where the first logical sector is placed, in bytes.

Example: Offset = 3 Logical sectors

In this example, BytesOffsetForSectorAlignment = 3 * BytesPerLogicalSector.

Examples

The following sample code retrieves a STORAGE_ACCESS_ALIGNMENT_DESCRIPTOR structure and displays the physical sector size and the logical sector size if it differs from the physical sector size.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

WinIoCtl.h (include Windows.h)