Linux tar compress command line

Linux tar compress command line for Linux servers to compress a files or folders use the following command $ tar -cvf filename.tar filename this can be also works for folders $ tar -cvf filename.tar foldername