Skip to content

Copies a file twice to compare the runtime (in nanoseconds) of the C functions read()/write() and fread()/fwrite().

Notifications You must be signed in to change notification settings

timgarvin/Copy-Cat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Description

Copy Cat is a C++ program that compares the runtime (in nanoseconds) of the C language functions read()/write() and fread()/fwrite() at different levels of bytes copied. This program makes two separate copies of a file the user specifies that is located in the /temp Linux directory: copy1_<original-filename>.txt using read()/write() and copy2_<original-filename>.txt using fread()/fwrite(). This program also outputs to the screen each step required to copy the file contents, the number of bytes copied, and the runtime for each in nanoseconds. This program is made-from-scratch and does not utilize the C++ Standard Template Library (STL).

Compilation and Execution

  • Compile: g++ copy-cat.cpp -lrt -o copy-cat
  • Run Program: ./copy-cat

Technologies Used

  • C
  • C++
  • Linux
  • PuTTY
  • WinSCP

Notes

  • This program should be compiled and executed in a Linux Operating System environment.

About

Copies a file twice to compare the runtime (in nanoseconds) of the C functions read()/write() and fread()/fwrite().

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages