Go to advanced search

by doubleudee1
Tue Sep 29, 2020 10:20 am
Forum: Troubleshooting
Topic: how to remove 320,000 files?
Replies: 24
Views: 789

Re: how to remove 320,000 files?

Thanks all for your code and ideas, I've picked a bit more knowledge up (again), I decided to use the code by GlowInTheDark for now as it seemed to be the quickest and eaiest fix for me cd ~pi/mnt/CamFiles mkdir tmp # This next line puts FrontOfHouse to tmp/FrontOfHouse mv FrontOfHouse tmp # Next, m...
by doubleudee1
Fri Sep 25, 2020 3:56 pm
Forum: Troubleshooting
Topic: how to remove 320,000 files?
Replies: 24
Views: 789

Re: how to remove 320,000 files?

Thanks, I'll give it a shot and get back here to let you know if it worked. It may not be tonight though.
Thks again.
by doubleudee1
Fri Sep 25, 2020 3:42 pm
Forum: Troubleshooting
Topic: how to remove 320,000 files?
Replies: 24
Views: 789

Re: how to remove 320,000 files?

I am thinking maybe there are too many files in the list for the pi's memory size?

Could I manually move them to temporarily created directories in blocks of maybe 20,000 or so?
by doubleudee1
Fri Sep 25, 2020 3:36 pm
Forum: Troubleshooting
Topic: how to remove 320,000 files?
Replies: 24
Views: 789

Re: how to remove 320,000 files?

Sory, that was my test script, I found out that shouldn't be there and removed it when I installed it. Here is the script as it is now, taken from the pi itself. #!/bin/bash #source $HOME/.bash_profile ## this file is being ran from the directory on the HDD '/CamFiles/FrontOfHouse/' (which is connec...
by doubleudee1
Fri Sep 25, 2020 3:24 pm
Forum: Troubleshooting
Topic: how to remove 320,000 files?
Replies: 24
Views: 789

Re: how to remove 320,000 files?

Here is the script:- #!/bin/bash #source $HOME/.bash_profile ## this file is being ran from the directory on the HDD '/CamFiles/FrontOfHouse/' (which is connected to the pi) ########FIRST MOVE ALL FILES TO /home/pi/mnt/CamFiles/FrontOfHouse/jpgFiles/################ mv /home/pi/mnt/CamFiles/FrontOfH...
by doubleudee1
Fri Sep 25, 2020 3:12 pm
Forum: Troubleshooting
Topic: how to remove 320,000 files?
Replies: 24
Views: 789

how to remove 320,000 files?

I have a directory which recieves files from my security camera. I have a file which has been running for 14 months or so which sorts the files weekly and then moves them from that folder into a new one created for the dates they are made for. I have not bothered with it for about 6 months knowing t...
by doubleudee1
Fri Oct 18, 2019 1:05 pm
Forum: Troubleshooting
Topic: error when running job in crontab "find: missing argument to `-execdir' "
Replies: 7
Views: 605

Re: error when running job in crontab "find: missing argument to `-execdir' "

OK, thanks both.
It looks like a combination of errors in my script using -- after -execdir, and also using --execdir, instead of -execdir.

All changed now a no errors came back from running them.

Thanks again.
by doubleudee1
Fri Oct 18, 2019 12:55 pm
Forum: Troubleshooting
Topic: error when running job in crontab "find: missing argument to `-execdir' "
Replies: 7
Views: 605

Re: error when running job in crontab "find: missing argument to `-execdir' "

B.Goode wrote:
Fri Oct 18, 2019 10:07 am
You appear to be inconsistent in your use of -execdir and --execdir. Might that be significant?
yes, I see that now so I have changed them all to --execdir, is that correct or should it be -execdir?
by doubleudee1
Fri Oct 18, 2019 12:39 pm
Forum: Troubleshooting
Topic: error when running job in crontab "find: missing argument to `-execdir' "
Replies: 7
Views: 605

Re: error when running job in crontab "find: missing argument to `-execdir' "

Try putting this version in your crontab: 1 1 * * * find /home/pi/mnt/CamFiles/FrontOfHouse/jpgFiles -type f -mtime +90 -name '*.jpg' -execdir rm {} \; >> /home/pi/jpgFilesRemovedF.txt 2>&1 This is what I find in my txt file running that:- -bash: 1: command not found ?????????????????
by doubleudee1
Fri Oct 18, 2019 9:25 am
Forum: Troubleshooting
Topic: error when running job in crontab "find: missing argument to `-execdir' "
Replies: 7
Views: 605

Re: error when running job in crontab "find: missing argument to `-execdir' "

Hello, Try this : 1 1 * * * find /home/pi/mnt/CamFiles/FrontOfHouse/jpgFiles -type f -mtime +90 -name '*.jpg' -execdir -- rm '{}'$ >> /home/pi/jpgFilesRemovedF.txt 2>&1 BR Pulsar33 Sorry, got this:- -bash: 1: command not found find: missing argument to `-execdir' Seems the same fault?
by doubleudee1
Fri Oct 18, 2019 7:22 am
Forum: Troubleshooting
Topic: error when running job in crontab "find: missing argument to `-execdir' "
Replies: 7
Views: 605

error when running job in crontab "find: missing argument to `-execdir' "

I am running a few jobs (successfully) in my crontab and have decided to try and remove files and folders off my hard disk that are older than a certain time so the disk does not fill up like an earlier disk I set up did. I have the line:- #### first jpg files ##### 1 1 * * * find /home/pi/mnt/CamFi...
by doubleudee1
Tue Oct 08, 2019 2:57 pm
Forum: Beginners
Topic: How will I Know [Are the directories created on my HDD and all files being put onto it]
Replies: 21
Views: 1245

Re: How will I Know [Are the directories created on my HDD and all files being put onto it,]

@rpdom Thanks! Problem solved, my next task is to move the data into daily directories instead of monthly as there is a lot of files coming from the cameras because they are fired up on detction of movement, so in the garden it picks up birds as well as small animals (which are all welcome), but int...
by doubleudee1
Tue Oct 08, 2019 5:51 am
Forum: Beginners
Topic: How will I Know [Are the directories created on my HDD and all files being put onto it]
Replies: 21
Views: 1245

Re: How will I Know [Are the directories created on my HDD and all files being put onto it,]

I think you do not fully understand file paths and the Linux naming conventions yet. You seem to be storing the files under /home/pi/mnt/CamFiles, but your storage is mounted in /pi/mnt/CamFiles. Those are two entirely different places. That means you are storing the files on the SD card. I created...
by doubleudee1
Mon Oct 07, 2019 10:52 am
Forum: Beginners
Topic: How will I Know [Are the directories created on my HDD and all files being put onto it]
Replies: 21
Views: 1245

Re: How will I Know [Are the directories created on my HDD and all files being put onto it,]

Apologies to all, I think I've got it all wrong! I thought that by connecting my external HDD (as per I have done with mountpoint /pi/mnt/CamFiles), I could then FTP files straight from my CCTV Cameras into that directory, do some changes to them, and they would be automatically moved onto my HDD. ...
by doubleudee1
Sun Oct 06, 2019 3:07 pm
Forum: Beginners
Topic: How will I Know [Are the directories created on my HDD and all files being put onto it]
Replies: 21
Views: 1245

Re: How will I Know [Are the directories created on my HDD and all files being put onto it,]

Looking at gparted I can see the following info:- Partition = dev/sda1 Name = CamFiles File System = ntfs MountPoint = /pi/mnt/CamFiles Size = 3.64 TiB Used = 180.88 MiB Flags = msfdata I think I have made a mistake in my Exec Files somewhere, here is one taken Directly from my DIR 'ExecFiles' which...
by doubleudee1
Sun Oct 06, 2019 1:02 pm
Forum: Beginners
Topic: How will I Know [Are the directories created on my HDD and all files being put onto it]
Replies: 21
Views: 1245

Re: How will I Know [Are the directories created on my HDD and all files being put onto it,]

On a command line (terminal) or ssh session on your Pi, try typing df -h to see what and where the disk usage is. You may have filled up your root (/) partition, but still have space for your files in another partition on your HDD. ######################################################### Thanks fo...
by doubleudee1
Sun Oct 06, 2019 9:55 am
Forum: Beginners
Topic: How will I Know [Are the directories created on my HDD and all files being put onto it]
Replies: 21
Views: 1245

Re: How will I Know [Are the directories created on my HDD and all files being put onto it,]

I can't even update anything:- pi@raspberrypi:~ $ sudo apt-get update Get:1 http://archive.raspberrypi.org/debian buster InRelease [25.1 kB] Err:1 http://archive.raspberrypi.org/debian buster InRelease Error writing to output file - write (28: No space left on device) [IP: 2a00:1098:0:80:1000:13:0:5...
by doubleudee1
Sun Oct 06, 2019 9:36 am
Forum: Beginners
Topic: How will I Know [Are the directories created on my HDD and all files being put onto it]
Replies: 21
Views: 1245

Re: How will I Know [Are the directories created on my HDD and all files being put onto it,]

I thought I'd created a NAS for extra space to use specifically for these files to go on from my CCTV cameras, they all FTP to 'pi/mnt/CamFiles' and I am definately having files onto my pi (or is it my NAS). Have I missed some stage out? #################################################### OK, my p...
by doubleudee1
Sat Oct 05, 2019 10:33 am
Forum: Beginners
Topic: How will I Know [Are the directories created on my HDD and all files being put onto it]
Replies: 21
Views: 1245

Re: How will I Know [Are the directories created on my HDD and all files being put onto it,]

Sorry for the late reply as I can only sit at my keyboard for short amounts of time as leaning forward gives me great pain and then I have to lay down for a while and take more painkillers (on top of all the other crap I have to take) but no probs, I'm glad for all input, every little bit of informa...
by doubleudee1
Fri Oct 04, 2019 2:38 pm
Forum: Beginners
Topic: How will I Know [Are the directories created on my HDD and all files being put onto it]
Replies: 21
Views: 1245

Re: How will I Know [Are the directories created on my HDD and all files being put onto it,]

Yes, I realise it is only a band aid and doesn't fix the root cause of your problem. But may be that is related to someone else's post of using a 3TB drive and Dougie's comment that GPT is required but not supported in any OS. Maybe try repartitioning/formatting your external drive and creating a f...
by doubleudee1
Fri Oct 04, 2019 12:59 pm
Forum: Beginners
Topic: How will I Know [Are the directories created on my HDD and all files being put onto it]
Replies: 21
Views: 1245

Re: How will I Know [Are the directories created on my HDD and all files being put onto it,]

If your problem is the SD card filling up and not allowing you to start Raspbian, then you can use NOOBS to do some maintenance work without having to start from scratch. In NOOBS, press shift to interrupt booting to Raspbian and go to the recovery menu. Press ctrl-alt-f2 and login to the recovery ...
by doubleudee1
Fri Oct 04, 2019 12:34 pm
Forum: Beginners
Topic: How will I Know [Are the directories created on my HDD and all files being put onto it]
Replies: 21
Views: 1245

Re: How will I Know [Are the directories created on my HDD and all files being put onto it,]

I'm going to let this run it's course, if the pi fills up, then I know I've missed something. Last 2 times I did it, when I came home from holidays my pi was locked up, I couldn't edit any of the config files, I'd get the message 'unable to edit fstab, or crontab .... no space available' this was ha...
by doubleudee1
Fri Oct 04, 2019 11:23 am
Forum: Beginners
Topic: How will I Know [Are the directories created on my HDD and all files being put onto it]
Replies: 21
Views: 1245

Re: How will I Know [Are the directories created on my HDD and all files being put onto it,]

I thought I'd created a NAS for extra space to use specifically for these files to go on from my CCTV cameras, they all FTP to 'pi/mnt/CamFiles' and I am definately having files onto my pi (or is it my NAS).
Have I missed some stage out?

Go to advanced search