10-10-2005
I'm not sure I understand this question. But maybe you want this command:
find . \( ! -name . -prune \) -type f -mtime +14
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
All,
Is there is anyother single command that will handle
ls -lrt | tail -10
Please let me know
Thanks,
Arun. (1 Reply)
Discussion started by: arunkumar_mca
1 Replies
2. Shell Programming and Scripting
Hi,
I would like to list latest 2 days, 3 days or 4 days,etc of files in the directory...
how? is it using ls? (3 Replies)
Discussion started by: happyv
3 Replies
3. Shell Programming and Scripting
I am trying to write a script to backup my laptop to a NAS drive using rsync. I want the backup to be done, only if it has been more than a week since my last backup.
Each time the rsync command executes, I also create a file backuptime.txt file, with the time at which the script completed the... (1 Reply)
Discussion started by: anandjayaraman
1 Replies
4. Solaris
Hi,
I want to find the list of all the files under a directory (including it's subdirectories) last modified 30 days, 60 days, 90 days..also I want to find out the rate at which the disk space is growing.
Please help. (3 Replies)
Discussion started by: b.paramanatti
3 Replies
5. Shell Programming and Scripting
Hi,
I have an application which creates some directories while running. I want to delete these directories which are 4 days older.
i tried
find . type d -mtime +1 -print
And it is working fine..
but
find . type d -mtime +4 -print
is not giving any results which are 4 days... (6 Replies)
Discussion started by: Tuxidow
6 Replies
6. Shell Programming and Scripting
Hi,
I am looking for a shell script with the following.
1. It should check whether a particular file exists in a location
#!/bin/sh
if ;
then
echo "xxx.txt File Exists"
else
echo "File Not Found"
fi
2. If file exists, it should check for the modified date and run a command... (2 Replies)
Discussion started by: karthikeyan_mac
2 Replies
7. Shell Programming and Scripting
Hi,
Is there a way to find all the files from a specific location and then zip them into a single file, even if they are in multiple directories? (3 Replies)
Discussion started by: rudoraj
3 Replies
8. UNIX for Dummies Questions & Answers
Hi All,
Problem Statement:Find all log files under all file systems older than 2 days and zip them. Find all zip files older than 3days and remove them. Also this has to be set under cron.
I have a concerns here
find . -mtime +2 -iname "*.log" -exec gzip {}
Not sure if this will work as... (4 Replies)
Discussion started by: saurabh.mishra
4 Replies
9. Shell Programming and Scripting
I need a script file for backup (zip or tar or gz) of old log files in our unix server (causing the space problem). Could you please help me to create the zip or gz files for each log files in current directory and sub-directories also?
I found one command which is to create gz file for the... (4 Replies)
Discussion started by: Mallikgm
4 Replies
10. UNIX for Beginners Questions & Answers
How to find a file that's modified more than 2 days ago but was modified less than 5 days ago by use of any Linux utility ? (4 Replies)
Discussion started by: abdulbadii
4 Replies
LEARN ABOUT XFREE86
git-prune
GIT-PRUNE(1) Git Manual GIT-PRUNE(1)
NAME
git-prune - Prune all unreachable objects from the object database
SYNOPSIS
git prune [-n] [-v] [--progress] [--expire <time>] [--] [<head>...]
DESCRIPTION
Note
In most cases, users should run git gc, which calls git prune. See the section "NOTES", below.
This runs git fsck --unreachable using all the refs available in refs/, optionally with additional set of objects specified on the command
line, and prunes all unpacked objects unreachable from any of these head objects from the object database. In addition, it prunes the
unpacked objects that are also found in packs by running git prune-packed. It also removes entries from .git/shallow that are not reachable
by any ref.
Note that unreachable, packed objects will remain. If this is not desired, see git-repack(1).
OPTIONS
-n, --dry-run
Do not remove anything; just report what it would remove.
-v, --verbose
Report all removed objects.
--progress
Show progress.
--expire <time>
Only expire loose objects older than <time>.
--
Do not interpret any more arguments as options.
<head>...
In addition to objects reachable from any of our references, keep objects reachable from listed <head>s.
EXAMPLE
To prune objects not used by your repository or another that borrows from your repository via its .git/objects/info/alternates:
$ git prune $(cd ../another && git rev-parse --all)
NOTES
In most cases, users will not need to call git prune directly, but should instead call git gc, which handles pruning along with many other
housekeeping tasks.
For a description of which objects are considered for pruning, see git fsck's --unreachable option.
SEE ALSO
git-fsck(1), git-gc(1), git-reflog(1)
GIT
Part of the git(1) suite
Git 2.17.1 10/05/2018 GIT-PRUNE(1)