I need to delete all files from the working directory and its sub directories using the find command, for that I am using -prune option but some how I am having a syntax issue.
I have tried the below, please help me correct the syntax
>> Works but only remove the files from the current directory
I am trying to get a list of top level directories below the search path but I don't want to descend subdirectories. The find command listed below returns me the list I want but it also returns subdirectories. I can't seem to get the -prune option to work the way I want. How would I modify the... (5 Replies)
Hi,
I'm using the following command to get a list of files on the system.
find /releases -type f -exec ls -l > /home/sebarry/list.txt '{}' \;
however, its searching a directory I don't want it to search so I know I have to use prune but I don't seem to be able to get prune and exec to work... (1 Reply)
I have a directory named https-abcd
Under that I have some directories, files and links.
One of those directories is with name logs and the logs directory has lot of files in it.
I need to tar the whole https-abcd directory excluding the logs directory only, I should get all the links, files and... (2 Replies)
Hi,
I am using a find command like below in my script:
find /outfiles -type f -name cat -o -name vi -o -name grep 2>/dev/null
Which will search for files like "cat" , "vi" or "grep" in the "/outfiles" and subdirectories.
I want to ignore a particular subdirectory from the search. I... (4 Replies)
I know one of the more seasoned veterans probably opened this thread looking for their chance to refer me to the site's search feature and let me tell you.
I'VE LOOKED!!!! And I didn't find anything helpful...
So, I've got a windows background and I'm fond of its search feature which comes... (6 Replies)
Hi , Kindly help me out .:)
i want to find only the file t4 in directory t3. i am in dir t . the tree is as follows.
if i give,
find .
o/p is
.
./t4
./t1
./t1/t2
./t1/t2/t3
./t1/t2/t3/t4
./t1/t2/t4
./t1/t4
directories are like t/t1/t2/t3 and each directory has file t4.
my... (7 Replies)
Hi,
I want to list files only from the current dir and its child dir (not from child's child dir).
i have the following files,
./ABC/1.log
./ABC/2.log
./ABC/ABC1/A.log
./ABC/ABC1/B.log
./ABC/ABC1/XYZ/A1.log
./ABC/ABC1/XYZ/A2.log
Here i want to list only the log file from current... (1 Reply)
Hi
I have a directory say mydir and inside it there are many files and subdirectories and also a directory called lost+found owned by root user
I want to print all files directories and subdirectorres from my directory using find command except lost+found
If i do
find . \( -name... (3 Replies)
Hi,
I am trying to find some files in a directory and then remove/list them if they are 30 days old. I also have 2 directories in that directory which I need to skip. Can someone please tell me what is the correct syntax?
find /developer/. -name "lost+found" "projects" -prune -o -type f... (2 Replies)
Hello, I am using ksh93 (/usr/dt/bin/dtksh) on Solaris and am stuck when trying to use find with the -prune option.
I need to search a directory (supplied in a variable) for files matching a certain pattern, but ignore any sub-directories.
I have tried:
find ${full_path_to_dir_to_search}... (9 Replies)
Discussion started by: gary_w
9 Replies
LEARN ABOUT CENTOS
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] [--expire <expire>] [--] [<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.
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.
--
Do not interpret any more arguments as options.
--expire <time>
Only expire loose objects older than <time>.
<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 nor 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 1.8.3.1 06/10/2014 GIT-PRUNE(1)