Browsed by
Month: November 2015

Java Timestamp vs Unix Timestamp

Java Timestamp vs Unix Timestamp

Unix timestamp is the number of seconds that have elapsed since midnight of January 1st 1970. To display unix timestamp in shell type: date +%s Sample output is a ten digit number: 1385726996   Java timestamp is the number of milliseconds that have elapsed since midnight of January 1st 1970 (thirteen digit number).

  To display unix timestamp in Java you can divide Java timestamp value by 1000:

  See also: Wikipedia – Year 2038 problem

Linux: Errors on FAT32 and NTFS partitions

Linux: Errors on FAT32 and NTFS partitions

Recently I have discovered interesting Linux feature (personally I am using Mint) – partitions with errors are mounted as read only. There are different ways of dealing with errors, depending of file system. FAT32 Install dosfscktools:

To use Dosfsck, you have to indicate the device address you want (Ex. /dev/sdb1, /dev/sdb2, or other device.). To know your device address, open the terminal (CTRL+ALT+T), then run this command:

If your partition is /dev/sdb1, for example, then unmount it first…

Read More Read More