Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts
2016/02/03
How to list files that where modyfied in directory days ago
find . -type f -mtime -1 -exec ls -l {} \;
2015/09/11
How to compress and decompress directory in Linux ?
1/
Compress and pack directory:
tar -zcvf archive.tar.gz directory/
c (create) - an archive from the files in directory (tar is recursive by default),
z (gzip) - compress it using the gzip algorithm,
f (file) - store the output as a named archive.tar.gz,
v(verbosely) list all the files it adds to the archive.
2/
Decompress and unpack the archive into the current director:
tar -zxvf archive.tar.gz
Compress and pack directory:
tar -zcvf archive.tar.gz directory/
c (create) - an archive from the files in directory (tar is recursive by default),
z (gzip) - compress it using the gzip algorithm,
f (file) - store the output as a named archive.tar.gz,
v(verbosely) list all the files it adds to the archive.
2/
Decompress and unpack the archive into the current director:
tar -zxvf archive.tar.gz
2015/04/24
How to zip unzip directory in Linux ?
Pack:
tar -zcvf archive.tar.gz directory/
c - create an archive from files in directory (recursive by default)
z - compress above archive with gzip
f - store the output as a file
v - list all the files
Unpack:
tar -zxvf archive.tar.gz
tar -zcvf archive.tar.gz directory/
c - create an archive from files in directory (recursive by default)
z - compress above archive with gzip
f - store the output as a file
v - list all the files
Unpack:
tar -zxvf archive.tar.gz
Subscribe to:
Posts (Atom)