tar command cannot be used alone. It must be used with one of -c, -r, -t, -u, -x.
create a tar file
tar -cf eulerProjects.tar /Users/shao/Info/github/eulerProjects tar -czf eulerProjects.tar.gz /Users/shao/Info/github/eulerProjects
options used here: c:create, z: zip. f:file
-z and -j have to be used to compress files into gzip, and bzip2 formats! When recovering from an archive, such options are not necessary.