filesystem

test

MTP (Media Transfer Protocol)

Media Transfer Protocol
https://en.wikipedia.org/wiki/Media_Transfer_Protocol
https://wiki.gentoo.org/wiki/MTP
https://wiki.gentoo.org/wiki/MTPfs

Related gentoo packages:

* media-libs/libmtp
Homepage: http://libmtp.sourceforge.net/
Description: An implementation of Microsoft's Media Transfer Protocol (MTP)

* sys-fs/go-mtpfs
Homepage: https://github.com/hanwen/go-mtpfs
Description: a simple FUSE filesystem for mounting Android devices as a MTP device

* sys-fs/jmtpfs

Provide an optimized partitioning for performance and space

Choosing the right storage drives is a game of balancing three different, competing needs:
- performance: I/O (read/write) speed.
- space (e.g. for large media files).
- reliability (permanent storage, backups).
Depending on the required amount of storage, and the amount of money available for spending, the right solution may be different.

However, our new distribution will strive to provide a sane default, with a judicious use of a /scratch partition:
http://linux.overshoot.tv/scratch

bash: validating a file (existence, type...)

How to validate a file?

#!/bin/bash
FILE=$1

if [ -f $FILE ];
then
   echo "The file $FILE exists."
fi

# For a directory, use -d:

if [ ! -d $FILE];
then
    echo "The file $FILE is not a directory."
fi

For more information, see section "6.4 Bash Conditional Expressions" of the bash documentation:
http://www.gnu.org/software/bash/manual/bash.html#Bash-Conditional-Expre...

Syndicate content