Search Results

Search: Posts Made By: ZerO13
902
Posted By balajesuri
Please let us know which OS you're using. It is...
Please let us know which OS you're using. It is important for this question because on most *nix flavours, the creation time is not stored in filesystem.

On windows, you can use...
10,739
Posted By Corona688
In what way did they not work? "Does not work"...
In what way did they not work? "Does not work" is manifestly unhelpful. They might be one minor correction away from working for all we know - rejecting them out of hand without even bothering to...
10,739
Posted By RudiC
I'm afraid that stubbornly repeating your...
I'm afraid that stubbornly repeating your question as well as that code snippet, ignoring any of the proposals given in this thread, won't take you anywhere.
Why don't you take a step back and start...
10,739
Posted By Don Cragun
If you want to ignore everything you've been told...
If you want to ignore everything you've been told and do not want to print directory names in order of date of creation and instead want to print directory names in order of increasing file status...
10,739
Posted By RudiC
How about, respecting the caveats by drl above: ...
How about, respecting the caveats by drl above:
ls -tcrd */ | while read DIRN; do echo "$DIRN"; done
10,739
Posted By apmcd47
If you have gnu ls $ ls --version ls (GNU...
If you have gnu ls
$ ls --version
ls (GNU coreutils) 8.21
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is...
1,684
Posted By rbatte1
If you want to search deeper that just within the...
If you want to search deeper that just within the current directory (i.e. searching within subdirectories) you can use the find command:-
find /path/to/source -type d -name "*word*"
Be aware that...
1,684
Posted By MadeInGermany
A trailing / ensures it is a directory for...
A trailing / ensures it is a directory
for filename in /home/test/*word*/
With your original loop, you can go for a case-esac, or, if there is only one pattern, go for a [[ == ]]
if [[ $filename...
1,684
Posted By Don Cragun
Depending on what you are doing with $filename...
Depending on what you are doing with $filename after determining that it names a directory, you might also be able to reduce the iterations through the loop by just looking for directories to start...
1,684
Posted By RudiC
Try for filename in /home/test/*word*
Try
for filename in /home/test/*word*
3,142
Posted By rbatte1
Breaking this up for clarity, you have...
Breaking this up for clarity, you have this:-#!/bin/bash

for i in `find /home/videos/ -name "*.mp4" -print0 | xargs -0`
do
ffmpeg -loglevel panic -y -i "$i" -frames 1 -q:v 5 -vf...
4,958
Posted By Don Cragun
As a further example of what jim mcnamara and...
As a further example of what jim mcnamara and RudiC are talking about, consider the following directories in your two file hierarchies:
/TEST1
/TEST1/dir1
/TEST1/dir1/dir1
/TEST1/dir3...
4,958
Posted By RudiC
Try find TEST1 TEST2 -type d | awk -F/...
Try
find TEST1 TEST2 -type d | awk -F/ '{D[$NF]++} END {for (d in D) if (D[d]>1) print D[d] ": " d}'
4,958
Posted By RudiC
The fdupes command that you mention does a very...
The fdupes command that you mention does a very thorough comparison of files before it does any action. You just want directory names regardless of contents?
4,958
Posted By RudiC
That's not too specific nor precise, is it? What...
That's not too specific nor precise, is it? What exactly are you after? Identical directory names/branches? Identical file names? Identical files?
1,275
Posted By Scrutinizer
Hi Ivo did you test this? Please be very...
Hi Ivo did you test this?

Please be very careful when suggesting the use ofrm -rf without fully knowing the consequences!

In this case before the find command is even being executed, the shell...
1,275
Posted By Ivo Breeden
find /home/test -name "*.testfile" -type f -exec...
find /home/test -name "*.testfile" -type f -exec rm -irf $(dirname {}) \;
Showing results 1 to 17 of 17

 
All times are GMT -4. The time now is 06:36 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy