Tar a file from directory based on date
up vote
0
down vote
favorite
How to compress(tar) some files based particular period of date from directory which has containing a lot of files.
tar
add a comment |
up vote
0
down vote
favorite
How to compress(tar) some files based particular period of date from directory which has containing a lot of files.
tar
Need example. Is not clean what period you mean.
– S_Flash
Nov 21 at 11:13
please would you like to tar the whole directory based on the current date or tar individual files based on current date
– ptetteh227
Nov 21 at 11:14
@ptetteh227 directory itself containing lot of files,so i want to compress one day to next day's files(example 2018-11-19 to 2018-11-20).So mentioning every file is very much difficulty.
– Jasil Op
Nov 21 at 11:48
There is a folder contains lot files , so i want to compress a particular day's files completely.@S_Flash
– Jasil Op
Nov 21 at 12:34
@JasilOp Please edit your question to add all the details you posted in comments. It helps to keep our Q&A style tidy and could also bring more attention since an edited question gets bounced on the homepage. See also How do comments work?
– Melebius
Nov 21 at 13:26
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
How to compress(tar) some files based particular period of date from directory which has containing a lot of files.
tar
How to compress(tar) some files based particular period of date from directory which has containing a lot of files.
tar
tar
asked Nov 21 at 10:08
Jasil Op
12
12
Need example. Is not clean what period you mean.
– S_Flash
Nov 21 at 11:13
please would you like to tar the whole directory based on the current date or tar individual files based on current date
– ptetteh227
Nov 21 at 11:14
@ptetteh227 directory itself containing lot of files,so i want to compress one day to next day's files(example 2018-11-19 to 2018-11-20).So mentioning every file is very much difficulty.
– Jasil Op
Nov 21 at 11:48
There is a folder contains lot files , so i want to compress a particular day's files completely.@S_Flash
– Jasil Op
Nov 21 at 12:34
@JasilOp Please edit your question to add all the details you posted in comments. It helps to keep our Q&A style tidy and could also bring more attention since an edited question gets bounced on the homepage. See also How do comments work?
– Melebius
Nov 21 at 13:26
add a comment |
Need example. Is not clean what period you mean.
– S_Flash
Nov 21 at 11:13
please would you like to tar the whole directory based on the current date or tar individual files based on current date
– ptetteh227
Nov 21 at 11:14
@ptetteh227 directory itself containing lot of files,so i want to compress one day to next day's files(example 2018-11-19 to 2018-11-20).So mentioning every file is very much difficulty.
– Jasil Op
Nov 21 at 11:48
There is a folder contains lot files , so i want to compress a particular day's files completely.@S_Flash
– Jasil Op
Nov 21 at 12:34
@JasilOp Please edit your question to add all the details you posted in comments. It helps to keep our Q&A style tidy and could also bring more attention since an edited question gets bounced on the homepage. See also How do comments work?
– Melebius
Nov 21 at 13:26
Need example. Is not clean what period you mean.
– S_Flash
Nov 21 at 11:13
Need example. Is not clean what period you mean.
– S_Flash
Nov 21 at 11:13
please would you like to tar the whole directory based on the current date or tar individual files based on current date
– ptetteh227
Nov 21 at 11:14
please would you like to tar the whole directory based on the current date or tar individual files based on current date
– ptetteh227
Nov 21 at 11:14
@ptetteh227 directory itself containing lot of files,so i want to compress one day to next day's files(example 2018-11-19 to 2018-11-20).So mentioning every file is very much difficulty.
– Jasil Op
Nov 21 at 11:48
@ptetteh227 directory itself containing lot of files,so i want to compress one day to next day's files(example 2018-11-19 to 2018-11-20).So mentioning every file is very much difficulty.
– Jasil Op
Nov 21 at 11:48
There is a folder contains lot files , so i want to compress a particular day's files completely.@S_Flash
– Jasil Op
Nov 21 at 12:34
There is a folder contains lot files , so i want to compress a particular day's files completely.@S_Flash
– Jasil Op
Nov 21 at 12:34
@JasilOp Please edit your question to add all the details you posted in comments. It helps to keep our Q&A style tidy and could also bring more attention since an edited question gets bounced on the homepage. See also How do comments work?
– Melebius
Nov 21 at 13:26
@JasilOp Please edit your question to add all the details you posted in comments. It helps to keep our Q&A style tidy and could also bring more attention since an edited question gets bounced on the homepage. See also How do comments work?
– Melebius
Nov 21 at 13:26
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
I would use find then pipe that into tar u.
find . -type f -newermt 2018-11-20 -not -newermt 2018-11-21 | tar -cvzf filename.tar.gz
New contributor
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
I would use find then pipe that into tar u.
find . -type f -newermt 2018-11-20 -not -newermt 2018-11-21 | tar -cvzf filename.tar.gz
New contributor
add a comment |
up vote
0
down vote
I would use find then pipe that into tar u.
find . -type f -newermt 2018-11-20 -not -newermt 2018-11-21 | tar -cvzf filename.tar.gz
New contributor
add a comment |
up vote
0
down vote
up vote
0
down vote
I would use find then pipe that into tar u.
find . -type f -newermt 2018-11-20 -not -newermt 2018-11-21 | tar -cvzf filename.tar.gz
New contributor
I would use find then pipe that into tar u.
find . -type f -newermt 2018-11-20 -not -newermt 2018-11-21 | tar -cvzf filename.tar.gz
New contributor
New contributor
answered Nov 21 at 12:58
Michael Quale
11
11
New contributor
New contributor
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1094752%2ftar-a-file-from-directory-based-on-date%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Need example. Is not clean what period you mean.
– S_Flash
Nov 21 at 11:13
please would you like to tar the whole directory based on the current date or tar individual files based on current date
– ptetteh227
Nov 21 at 11:14
@ptetteh227 directory itself containing lot of files,so i want to compress one day to next day's files(example 2018-11-19 to 2018-11-20).So mentioning every file is very much difficulty.
– Jasil Op
Nov 21 at 11:48
There is a folder contains lot files , so i want to compress a particular day's files completely.@S_Flash
– Jasil Op
Nov 21 at 12:34
@JasilOp Please edit your question to add all the details you posted in comments. It helps to keep our Q&A style tidy and could also bring more attention since an edited question gets bounced on the homepage. See also How do comments work?
– Melebius
Nov 21 at 13:26