Linux Commands - accgetter/OS GitHub Wiki
find
Example;
display top directory name list that update date is between "2018-04-07 00:00:00" and "2018-04-12 00:00:00"
find . -maxdepth 1 -type d -newermt "2018-04-07 00:00:00" -and ! -newermt "2018-04-12 00:00:00" -ls -t
sendfile
$ cat /proc/version
Linux version 2.6.32-696.13.2.el6.x86_64 ([email protected]) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-18) (GCC) ) #1 SMP Thu Oct 5 21:22:16 UTC 2017
$ sendfile --help
$ man sendfile
relation word:
file descriptor
tar
Linux version 2.6.32-642.3.1.el6.centos.plus.x86_64 ([email protected]) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-16) (GCC) ) #1 SMP Tue Jul 12 18:28:07 UTC 2016
$ tar --help
$ man tar
Example;
Compress large file
-
first
$ cd 'dir where there is file you want to compress'
-
Compress specific file
$ tar cvzf xxxxx.sql.tar.gz xxxxxx.sql
-
extract compressed file
$ tar zxvf xxxxx.sql.tar.gz
-
options
-c, --create create a new archive
-v, --verbose verbosely list files processed
-f, --file=ARCHIVE use archive file or device ARCHIVE
-z, --gzip, --gunzip, --ungzip filter the archive through gzip