How to get sorted output from find

I have this command (thanx to dgeorgiev): find /somePath -maxdepth 1 -name "log.out*" -type f \ -printf "Date: %TY-%Tm-%Td - Time: %TT - File: %f\n" -exec tail -n5 {} \; I would like to have the output of it sorted by date & time, so tha...
more »

2017-03-19 10:03 (1) Answers

Java AVL Tree Find Implementation

I am trying to implement a find method that will find if a given input key is within my AVL tree. When I try compiling my code, I get a null pointer exception when I compare the the strings (first if statement within while loop) //Returns the dictio...
more »

2017-03-18 22:03 (0) Answers

Find and Replace multiple lines in notepad++

So I got a text file with over 100000 lines to find and replace. Here is what I need to find: >>DiskNum: 118 adfad adfadf adfadf adfad adafdd >>FilePath: \\xxx\xxx\abc.tif Replace with: >>DiskNum: 118 adfad adfadf adfadf adfad a...
more »

2017-03-18 09:03 (1) Answers

Excel VBA Range.Find: xlPart vs xlWhole

Watch Hi! So I am trying to find a cell which contains exactly "FTEs" string. When I use xlPart it finds it but I need it working with xlWhole because it could be a substring and I don't want that to be found. The issue is that the cell which xlPart...
more »

2017-03-17 16:03 (0) Answers

Search for files that contain pattern

I have this search - I would like to print out the paths of files that contain the matching text: grep -r "jasmine" . and it yields results that look like this: ./app-root/runtime/repo/node_modules/jasmine-core/.github/ [Jasmine...
more »

2017-03-17 01:03 (1) Answers

sed not working properly inside find's "exec"

I am working on a one-liner to remove the extensions to a bulk of files in a location. This is what it looks like, and it should work, but it does not: find . -type f -name '*.txt' -exec mv {} $( echo {} | sed 's/\.txt//g' ) \; The replacement ...
more »

2017-03-16 22:03 (1) Answers

Accidentally moved several files into one file

I sometimes use bash under Windows 10 to move files with find. I wanted to move some files into a new folder. Every file is in it's own subfolder and I wanted to move all of these certain files into one new, so I ran this command: find -type f -path...
more »

2017-03-16 20:03 (0) Answers

C++ how to use std::find properly

I got a question about one article in and exactly about std::find which is function from the Algorithm library. Here is my code. Code in randnum.cpp: #include "randnum.h" void randNum (char timeATM) { int *p, newRandNum; ...
more »

2017-03-15 22:03 (4) Answers

Best pratices for searching in unordered_map

I want to create a std::unordered_map < int, std::string > or std::unordered_map< std::string, int >. In this map I will store strings and their integer representations. I'll fill this map only in the code(hard coded pairs). I'll need co...
more »

2017-03-14 15:03 (2) Answers

can't find class in separated files

This is my first time doing java codes, and I am confused on this. I supposed to compile 2 files, the first is which contains class lingkaran, and the second is which is the main file. The compiles just f...
more »

2017-03-13 22:03 (2) Answers

Grep and delete file

I run the following code to delete malware, I would like to extend it with a pipe so it can delete the files that found to contain the string below (delete result return by grep). grep -rnw . -e "ALREADY_RUN_1bc29b36f342a82aaf6658785356718" It ret...
more »

2017-03-13 03:03 (1) Answers

Search through a vector of objects?

I would like a method to search through my vector. Find a matching string when taken from the user's input. Then output using the second block of code. Here's my code: void Ingredient::database(Ingredient &object){ Ingredient item1("White ...
more »

2017-03-12 17:03 (1) Answers

Using -exec on output from bashrc function

In Cygwin, I wrote a bashrc function rg, which is basically a recursive grep statement: rg () { find . -type f -exec grep -il $1 {} \; } This works well, but now I need to run an additional grep on each output line to check for another word. I...
more »

2017-03-10 15:03 (1) Answers

C++ Find Text & Count Occurrences

I am doing some classwork and not having any luck getting my find to work appropriately. When I run the code using CLION the code works appropriately for single words. Multiple words do not work. Also when uploading to the class website that tests...
more »

2017-03-09 03:03 (1) Answers

Match Owner to filepath using Bash/Perl from Array

I dont have any preference bash/perl etc for this. ( i'm not a developer but have experience with both ) I will have a list of File System Paths read recursively by a script to find large or old files - so lets imagine I have a File with list of pat...
more »

2017-03-08 17:03 (1) Answers