Why does my find command seem to execute twice?

I have this find command that I use to remove files that are older as 30 days from a specific directory. DIR="/path/to/backups/" find $DIR -type d -ctime +30 -exec rm -rf {} \; When I run this command it works but I get a always the following r...
more »

2017-01-13 13:01 (0) Answers

Beautiful Soup puzzle with soup.find() method

I am learning Beautiful Soup and Python and in this context I am doing the "Baby names" exercise of the Google Tutorial on Regex using the set of html files that contains popular baby names for different years (e.g. baby1990.html etc). You can find t...
more »

2017-01-12 15:01 (1) Answers

How to speed up UTF-8 string processing

I am parsing tab-separated values: pub fn parse_tsv(line: &str) -> MyType { for (i, value) in line.split('\t').enumerate() { // ... } // ... } perf top contains str.find. When I look in the generated assembly code, there...
more »

2017-01-12 09:01 (1) Answers

Finding the oldest file in AIX Unix

I'm looking for a Command to find the oldest file in AIX Unix. In AIX Unix, '-print' doesn't accept any options, so find . -type f -print '%T+ %p\n' | sort | head -n 1 won't work as it works in Linux. And AIX doesn't have 'printf'. Is there any f...
more »

2017-01-12 07:01 (0) Answers

Invoking find command from Swift not working

I translated the terminal input to code that way but it doesn't work. find folder_path -not -path "folder_path/subfolder/*" -print -exec zip '{}.zip' '{}' \; to let path = "/usr/bin/find" let arguments = ["folder_path","-not","-path","folder_pat...
more »

2017-01-11 23:01 (0) Answers

Find similar filenames

How to find similar filename in linux commands? For exemple: I have similar files in diferent directories dir1: > Imagine - John Lennon > Smells Like Teen Spirit, Nirvana dir2: > John Lennon - imagine > Nirvana - smells...
more »

2017-01-11 16:01 (0) Answers

Linux "Locate" command and symbilic link

Does anyone know why "locate" command ignore symbolic links? Ex: lrwxrwxrwx 1 user user 6 Jan 17 2015 bin -> ../bin When I use locate to find file under this bin, it doesn't find anything. Command I used is = locate -ir '.*/bin/java$' ...
more »

2017-01-10 18:01 (0) Answers

find().toArray() doesn't return anything

I'm quite new to mongodb and I'm having some issues I cannot find answers to. My question is performance I suppose. When I'm trying to query a collection using db.collection.find() I can get all the result and look through them in robomongo. What I ...
more »

2017-01-10 10:01 (0) Answers

Mass-renaming of files with double quote in name

I have a file system with a lot of files that I want to use on a Windows machine. Illegal characters in filenames are a problem, so I searched for a bash command which recursively sanitizes illegal characters from all files. I found this solution (h...
more »

2017-01-09 12:01 (1) Answers

erase file by batches

Need to erase 150K files from a folder, and I want to erase them by batches what would be the best way ? for instance delete the first 1000 results of find . -time +600 -exec rm {} \; ...
more »

2017-01-06 20:01 (1) Answers

Find string in substring with vlookup in Excel

I have an excel sheet with names of flowers, for example: Polygonum amphibium Hippuris vulgaris Lysimachia vulgaris Juncus bulbosus ssp. bulbosus Lycopus europaeus ssp. europaeus Nymphaea alba Now I need to find these Names in another table which...
more »

2017-01-06 10:01 (2) Answers

csh find command: how to get the upmost directory

I'm looking for a csh command that searches directories only. I know the name of the directory (MY_DIR), however I totally ignore how far below the current directory they are. I'd like the command : gave no error messages in case it ended up to no...
more »

2017-01-06 10:01 (1) Answers

bash update file list of filenames with full path

I have a log file that looks like this: Jan 1 06:09:23 somefile.txt Jan 2 12:18:27 somefile1.txt Jan 3 04:16:00 somefile2.txt I would like to find each file and insert the full path of each file into this file. I would think there is some combi...
more »

2017-01-05 18:01 (2) Answers

Combining find command conditions

I am trying to combine 2 find commands to pipe to a grep pattern match. my 3 commands are: get files modified in the last 24 hours: find '/logs' -mtime 0 -type f ignore a couple of directories: find -type d \( -path /dir -o -path /dir2 -o -path...
more »

2017-01-05 15:01 (3) Answers

Excluding folder with find wildcards

Why this works as expected: find . -path './books' -prune -o -print but this won't: find . -path 'books' -prune -o -print Because in the second example is obvious that I want to exclude books directory while finding in the current directory. So...
more »

2017-01-03 02:01 (0) Answers

rails : how can I use find_each with map?

I have a form that has nested field (habtm and accepts_nested_attributes_for). That form contains with a field "keywords", that autocompletes keywords that come from a postgresql table. All that works well. This is in params : "acte"=>{"biblio...
more »

2017-01-02 00:01 (1) Answers