Tuesday, July 8, 2014

Some useful Commands in Solaris 10

if you ever needed to create an empty file with certain size, then all you have to do is to use this command:

dd if=/dev/zero of=FILE_NAME bs=BLOCK_SIZE count=NUMBER_OF_BLOCKS

where FILE_NAME is the name of target file and NUMBER_OF_BLOCKS is number of blocks per file, the size of the file is going to be created based on this formula:

File size = NUMBER_OF_BLOCKS x BLOCK_SIZE

as an example:

dd if=/dev/zero of=test_for_download bs=1024 count=1048576


------------------------------------------------------------------------------------------------------------

if you ever need to create shortcut for a certain directory in Solaris, use ln command:

ln -s dir_to_link_to link_name

No comments:

Post a Comment