Tag Info

Hot answers tagged

7

If on Linux, when loading the loop module, make sure you pass a max_part option to the module so that the loop devices are partitionable. Check the current value: cat /sys/module/loop/parameters/max_part If it's 0: modprobe -r loop # unload the module modprobe loop max_part=31 To make this setting persistent, add the following line to ...


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

losetup /dev/loop0 file -o 1048576 --sizelimit limit Offset specified should be in bytes (1048576 = 2048 sectors * 512 bytes per sector). mount -o loop,offset=1048576,sizelimit=limit For more information see losetup and mount.


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

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.


2

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


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

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

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 ...


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

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

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 ...


1

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.


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.


1

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 ...


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

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



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