Tag Info

Hot answers tagged

6

Dosfstools, which provides mkfs.vfat and friends, also provides dosfslabel to change the label.


5

It seems that you do not have the "codepage cp437" support in the kernel. Try to Look inside your /proc/config.gz file and search for a line like CONFIG_NLS_CODEPAGE_437=m or CONFIG_NLS_CODEPAGE_437=y. If you do not find it, you'll have to recompile the kernel to add the needed module.


5

First thing that comes to mind is to mv the file(s) to a temporary, cp the temporary file to the old filename and delete the temporary. I just made a fast check: touch foo ls -l foo returns: 0 -rw-r--r-- 1 shunz shunz 0 2011-03-22 11:07 foo wait some minutes and then: mv foo bar ls -l bar 0 -rw-r--r-- 1 shunz shunz 0 2011-03-22 11:07 bar notice ...


4

ext3 stores the last mount time and can be retrieved with: dumpe2fs -h /dev/node I'm not sure that FAT stores this information.


3

Depending on what OS you are using there are command line utilities such as: FatSort And touch won't help you with sort since all you will be able to do with it is manipulate the timestamps on the file or directories.


3

I finally ended up using fatsort, which does the job nicely, and it's also a lot quicker than copying the files over and over.


3

Try sudo mlabel -i <device> ::<label>, for example sudo mlabel -i /dev/sdb1 ::new_label. Reference: RenameUSBDrive on the Ubuntu community documentation.


2

You need to set codepage and charset in kernel options: make menuconfig -> File systems: -> Native language support: <*> Codepage 437 (United States, Canada) <*> NLS ISO 8859-1 (Latin 1; Western European Languages) -> DOS/FAT/NT Filesystems (437) Default codepage for FAT (iso8859-1) Default iocharset for FAT and then recompile ...


2

You probably want to add a line like /dev/sdb1 /media/drive1 vfat dmask=000,fmask=0111,user 0 0 to /etc/fstab. The additional ,user in the options field allows any user to mount this filesystem, not just root.


2

Rsync with --iconv would be an option, but you'd first need to define an encoding where ?, : and others are encoded with characters that are allowed on FAT filesystems. For your use case, you aren't using all the power of rsync for this. This task can be done in a few lines of shell script. Here's a bash script that copies ~/Music to /media/usb99, skipping ...


2

If it is for backup purposes, just stash away a tarball. No filename hassles that way.


2

You can check whether a file is fragmented or not using the filefrag utility. That way you could filter out the files that aren't fragmented, and do the copy/copy back only for already fragmented files. That should save you some time. However be aware that there is no guarantee the new file layout will be better than the old one. The best way is to ignore ...


2

I'm pretty sure the only reserved bytes are 0 (ASCII Nul) and 0x2f (ASCII '/', forward slash). You can easily make a file with '.', '\' and other funky things in it. Think "unicode file names", which contain all kinds of weird byte values. Naturally, you can't have duplicate file names in the same directory, so files named "." and ".." can't usually be ...


2

On a filesystem that supports normal Unix file attributes, each file has a user who is designated as owner. Only the owner of a file may change its timestamps with utime. Other users aren't allowed to change timestamps, even if they have write permission. FAT filesystems don't record anything like an owner. The FAT filesystem driver pretends that a ...


2

This worked for me: # truncate -s 8G foobar # losetup -f --show foobar /dev/loop0 # mkdosfs -F 32 /dev/loop0 $((2*1024*1024)) mkfs.fat 3.0.25 (2014-01-17) Warning: block count mismatch: found 8388608 but assuming 2097152. Loop device does not match a floppy size, using default hd params # mount /dev/loop0 /mnt/tmp # df -h /mnt/tmp Filesystem Size Used ...


2

FAT16 can hold a very limited number of files on the root directory. My guess is that you are hitting that. Create a directory and put files in it.


2

You are confusing the rw option with the umask. The rw option merely dictates that the partition is not mounted read-only. The umask option dictates what permission that not set on files and directories. Your current umask of 022 sets the permission bits to 755 which translates to rwxr-xr-x. Change the umask to 000, which should give you 777 or rwxrwxrwx ...


1

You don't mention unmounting before ejecting the card. If that isn't an omission when writing the question, there's your problem. Writing to any kind of disk is buffered: the operating system accumulates data to write in memory, then writes it to the disk when it judges it to be convenient. The data isn't necessarily written to the disk in the same order ...


1

There are no inodes on most non-Unix file systems (like vfat). It's normal that none are shown. For the rest of the problem we need more info. Edit 1: From the du output we now know that there are 1999360-1142944=856416 blocks missing. With Linux file systems such differences can occur if an open file is deleted. You do not see it in the file system any ...


1

FAT has a "hidden" flag, which works under windows unless you poke through the folder settings to show hidden files (which I tend to do as a 'standard thing' on new windows computers :P). I dont know if UNIX FAT or Mac OS would support that flag, unix standard is to prefix hidden stuff with a dot, mac I have no clue (or care) about but probably works the ...


1

If I'm not mistaken any filesystem supported by Windows (FAT/VFAT/FAT32/NTFS) should meet some standard naming conventions for valid file and directory names. The aforementioned list of characters are reserved characters which can't be used even with Unicode characters. I would say that Linux implementation of fat/vfat filesystems tries to be compliant ...


1

So far the only way I found to change FAT volume name whit lower cases is to edit it whit a hex-editor (copy the first few sectors whit dd to a temp file, edit it and copy it back). It works well so far (even whit FAT16) and neither fsck nor CHKDSK from Win7 complained. But no guarantee of course ;-)


1

Have a look at the ubuntu page about renaming usb drives, it's basically: mlabel -i <device> ::<label>


1

dmask and fmask is the permissions for directories and files respectively. It is an octal number. And denotes read, write and execute permissions for Owner, Group and Other users. fstab: /dev/sdb1 /media/exampleFolderName vfat dmask=000,fmask=111 0 0 When you say plug the drive in, an external drive e.g USB should automount.



Only top voted, non community-wiki answers of a minimum length are eligible