Technology and troubleshooting.

Monday, June 6, 2016

How to create test files of any size

This tutorial describes How to create test files of any size in windows.
How to create test files of any size

Overview

Fsutil is typically used by support professionals. Finds a file by security identifier, queries allocated ranges for a file, sets a file's short name, sets a file's valid data length, sets zero data for a file, or creates a new file.

Key Ideas

Fsutil: File system utility.
File: Finds a file by its security identifier, queries allocated ranges for a file, sets a file's short name, sets a file's valid data length, or sets zero data for a file.

Now Do It

The following Syntax can be used to create a test file of any length. 

fsutil file createnew <filename> <filesize in bytes>
 

For example, to create a 20 megabyte test file:

  1. Click on the ‘Start’ button
  2. In the search box type ‘cmd’
  3. Right-click on Command Prompt and choose ‘Run as administrator’
  4. Enter the following command in cmd:
        fsutil file createnew c:\log.txt 20971520
create test files of any size_cmd


      5. The file will be located in the C:\

create test files of any size_log

I hope this information is useful for you. Please forgive any typos or incomplete sentences.
Share:

Friday, June 3, 2016

Mounting Linux Filesystems Automatically at Boot Time

  This tutorial describes How to Mounting Filesystems Automatically at Boot Time
Mounting Linux Filesystems Automatically at Boot Time

Overview

All devices connected to a Linux system are listed under the /dev directory, including hard disks and partitions. Linux operating systems use partitions with file systems by attaching to them. A partition with a filesystem in the /dev directory, like /dev/sdb1, is attached to a directory in the operating system hierarchy, like /mnt/. This is called mounting: the device is mounted to a directory.

Sometimes it is acceptable to manually mount partitions as they are needed. Often though, a partition was created to be used persistently, and in some cases data stored on the partition may be required to run the system. Instead of mounting partitions manually every time they are needed, it makes more sense to mount them automatically as part of the operating system’s boot up operations.

Key Ideas

Mount: The mount command is used to attach a filesystem to a directory in the operating system’s file hierarchy.
/etc/fstab: The fstab file in the /etc/ directory governs how filesystems are mounted during the operating system’s boot operations. It contains a list of partitions, mount points, and mount options.
UUID: Partitions have a unique identifier called a UUID to provide a stable way of addressing them. The names of devices under /dev is subject to change if, for example, additional hard disks are connected to the system. UUIDs provide a consistent way of addressing partitions.
blkid: The blkid command displays all disk partitions and their associated UUIDs.
mkdir: The mkdir command creates directories.

Configuration

1. Use the mkdir to create a new directory called URBackup under /mnt/
[root@Techlanda.com ~]# mkdir /mnt/URBackup
2. Use the blkid command to find the UUID of the partition to be automatically mounted at boot time.
[root@Techlanda.com ~]# blkid (list the UUID)
[root@Techlanda.com ~]# blkid /dev/sdb1 (This command assumes that the partition to be automatically mounted at boot time is /dev/sdb1)
3. Edit and save the /etc/fstab file, adding a new line for the new automatic mounting instruction.
Replace this with the output of /dev/sdb1.
[root@Techlanda.com ~]# vi /etc/fstab
UUID=c2fb3267-26c9-464a-8366-00eaf72c626c /mnt/URBackup    ext4    defaults 0 0
:wq! to save (or) :q! to abort changes
4. Use the mount command with the -a option to mount all entries in the /etc/fstab file.
[root@Techlanda.com ~]# mount -a
(or)
[root@Techlanda.com ~]# mount /mnt/URBackup/
5. Use the mount command to list the currently mounted partitions.
[root@Techlanda.com ~]# mount -l

I hope this information is useful for you. Please forgive any typos or incomplete sentences.



Share:

Contributors

Popular Posts