02-11-2018
I've rewritten all my code to use touch / find method Don mentioned here, some time ago.
I do remember having more hair back then, so we are talking years
Specifying ranges in such fashion (touch/find) will make your code work on any unix/linux operating system in existence without change.
Regards
Peasant.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Dear All:
I want to build a shell that delete files created two or more days ago ... I think it could be built using a special command with ls or grep, I'd apreciate any help from you guys
I have a lot of log files from november, december, january and this tool will help me a lot
The files... (3 Replies)
Discussion started by: josecollantes
3 Replies
2. Shell Programming and Scripting
Please tell me how can I wirte a function to return the date 7 days ago by using calendar command? :confused: (2 Replies)
Discussion started by: LAY
2 Replies
3. UNIX for Dummies Questions & Answers
How can I get difference date between today and 15 days ago and all filename is was created before 15 days ago?
It has to be korn shell script.
Thanks. (1 Reply)
Discussion started by: YoungBlood
1 Replies
4. Shell Programming and Scripting
How can I get difference date between today and 15 days ago and all filename is was created before 15 days ago?
It has to be korn shell script.
Thanks. (2 Replies)
Discussion started by: YoungBlood
2 Replies
5. Shell Programming and Scripting
i need a script that can tell me the date 2 days ago or 3 days ago.
please help (7 Replies)
Discussion started by: tomjones
7 Replies
6. Shell Programming and Scripting
How could I using the following example, change it to show 2 days ago within the same time frame 0600 AM to 0600 AM
let foo=`date "+(1%H-106)*60+1%M-100"` bar=foo+1440
find . -mmin +$foo -mmin -$bar | tr -s '/','-' '^' | cut -f2,3 -d"^" | tr -s '^' ' ' |
Please use code tags (7 Replies)
Discussion started by: freddie999
7 Replies
7. Shell Programming and Scripting
i want to find unix file created how many days ago? (4 Replies)
Discussion started by: utoptas
4 Replies
8. UNIX for Advanced & Expert Users
Hi,
the following gives today
$(date '+%d%m%y')
For example 210111 for today (21 of january 2011).
How can I have n days ego ? For example 160111 for 5 days ego ?
thank you. (3 Replies)
Discussion started by: big123456
3 Replies
9. Shell Programming and Scripting
Hi,
I need to grep for a string "Color Yellow" in all log files dated 5 days back until today's date .
So, as today is 20 Dec i need to find in all logs from 16th dec to 20 dec.
Also, i need ls -ltre output for the files that have the "Collor Yellow" string.
Below is my OS:
... (1 Reply)
Discussion started by: mohtashims
1 Replies
10. Shell Programming and Scripting
Hi all,
I have been researching to obtain SSL certification expiry for most of our webistes. For some cases, some hosts where not directly accessible so i finally got a solution working with curl using my proxy. This lists the expiry date which i'm finally looking for.
# curl --proxy... (4 Replies)
Discussion started by: nms
4 Replies
LEARN ABOUT CENTOS
git-reflog
GIT-REFLOG(1) Git Manual GIT-REFLOG(1)
NAME
git-reflog - Manage reflog information
SYNOPSIS
git reflog <subcommand> <options>
DESCRIPTION
The command takes various subcommands, and different options depending on the subcommand:
git reflog expire [--dry-run] [--stale-fix] [--verbose]
[--expire=<time>] [--expire-unreachable=<time>] [--all] <refs>...
git reflog delete ref@{specifier}...
git reflog [show] [log-options] [<ref>]
Reflog is a mechanism to record when the tip of branches are updated. This command is to manage the information recorded in it.
The subcommand "expire" is used to prune older reflog entries. Entries older than expire time, or entries older than expire-unreachable
time and not reachable from the current tip, are removed from the reflog. This is typically not used directly by the end users -- instead,
see git-gc(1).
The subcommand "show" (which is also the default, in the absence of any subcommands) will take all the normal log options, and show the log
of the reference provided in the command-line (or HEAD, by default). The reflog will cover all recent actions (HEAD reflog records branch
switching as well). It is an alias for git log -g --abbrev-commit --pretty=oneline; see git-log(1).
The reflog is useful in various Git commands, to specify the old value of a reference. For example, HEAD@{2} means "where HEAD used to be
two moves ago", master@{one.week.ago} means "where master used to point to one week ago", and so on. See gitrevisions(7) for more details.
To delete single entries from the reflog, use the subcommand "delete" and specify the exact entry (e.g. "git reflog delete master@{2}").
OPTIONS
--stale-fix
This revamps the logic -- the definition of "broken commit" becomes: a commit that is not reachable from any of the refs and there is a
missing object among the commit, tree, or blob objects reachable from it that is not reachable from any of the refs.
This computation involves traversing all the reachable objects, i.e. it has the same cost as git prune. Fortunately, once this is run,
we should not have to ever worry about missing objects, because the current prune and pack-objects know about reflogs and protect
objects referred by them.
--expire=<time>
Entries older than this time are pruned. Without the option it is taken from configuration gc.reflogExpire, which in turn defaults to
90 days.
--expire-unreachable=<time>
Entries older than this time and not reachable from the current tip of the branch are pruned. Without the option it is taken from
configuration gc.reflogExpireUnreachable, which in turn defaults to 30 days.
--all
Instead of listing <refs> explicitly, prune all refs.
--updateref
Update the ref with the sha1 of the top reflog entry (i.e. <ref>@{0}) after expiring or deleting.
--rewrite
While expiring or deleting, adjust each reflog entry to ensure that the old sha1 field points to the new sha1 field of the previous
entry.
--verbose
Print extra information on screen.
GIT
Part of the git(1) suite
Git 1.8.3.1 06/10/2014 GIT-REFLOG(1)