LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-27-2024, 06:35 AM   #16
kzo81
Member
 
Registered: Aug 2014
Location: Hungary
Distribution: Debian, Linux Mint, CentOS
Posts: 197

Original Poster
Rep: Reputation: Disabled

Quote:
Originally Posted by pan64 View Post
Forget that impact on systemd, do not hate it that much.
You can check if there is a pid for that find, and you will see it is running. \; just belongs to that find command at the end of the line.
The permission denied is a different issue, you need to find out why is it read only (no, it is not because of systemd).
I really like systemd, it's a heaven compared to sysVinit. I never had any problem with it in the last years :-)

There is a PID for that find line, I've seen it with the systemd service, however the files never gets moved.

Last edited by kzo81; 03-27-2024 at 06:39 AM.
 
Old 03-27-2024, 07:35 AM   #17
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 2,796

Rep: Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201
Use quotes here:
-name "*.mkv"
otherwise the shell tries filename generation (would replace it with matching .mkv files in the current directory).

Perhaps you should mount your unreliable ssd with option errors=continue
 
1 members found this post helpful.
Old 03-27-2024, 07:49 AM   #18
kzo81
Member
 
Registered: Aug 2014
Location: Hungary
Distribution: Debian, Linux Mint, CentOS
Posts: 197

Original Poster
Rep: Reputation: Disabled
Do you think this is ok? Where should I put the '{}' in the red line?
Code:
#find $SRC -mmin +1 -type f -name "*.mkv" -exec mv "{}" $EXPORTS \;

find $SRC -mmin +1 -type f -name "*.mkv" -exec rsync --remove-source-files --timeout=30 -avme "ssh -i $KEY -p $REMOTE_PORT" $SRC $REMOTE_USER@$REMOTE_IP:$DST \;

Last edited by kzo81; 03-27-2024 at 07:52 AM.
 
Old 03-27-2024, 09:16 AM   #19
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 2,796

Rep: Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201
The rsync source is not $SRC but {} i.e. each found file.
 
Old 04-03-2024, 01:36 AM   #20
kzo81
Member
 
Registered: Aug 2014
Location: Hungary
Distribution: Debian, Linux Mint, CentOS
Posts: 197

Original Poster
Rep: Reputation: Disabled
Cool

Hi Folks,

I figured it out. If I insert this into the beginning of my script, systemD runs it correctly:

Code:
PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/bin/X11:/usr/local/bin:/usr/local/sbin"
Thank you for your suggestions
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
xargs: unmatched single quote; by default quotes are special to xargs unless you use Raakh5 Linux - Newbie 7 05-21-2014 07:26 PM
How to use xargs within xargs ? anindyameister Linux - Newbie 1 05-15-2013 05:01 AM
Several "find -exec" and "find | xargs" questions thanhvn Programming 4 12-02-2005 01:04 PM
Phục hồi dữ liệu bị mất???, cứ pollsite General 1 06-27-2005 12:39 PM
Gotta love those ٱٱٱٱٱٱٱ&# iLLuSionZ Linux - General 5 11-18-2003 07:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration