Create a specific bash to increase the automatic update on my pi


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Create a specific bash to increase the automatic update on my pi
# 1  
Old 01-18-2014
Create a specific bash to increase the automatic update on my pi

hi everyone,
I just began to be interested about the bash access.
I buy a time ago a Raspberry pi, I installed raspbmc and now I would like build a bash to copy everyday all new files inside my server directly on the hard drive in my Pi.

So my HDD is directly plug on my pi with usb connect, the server is connected on the pi too with internet acces, I can already see and copy the files between the two folder.

the bash I would like should be find all files younger than 24h, everyday in the same h and copy all inside a hdd folder.

I find some about this but I'm not good with code, so if anyone can help me I'll be very interested. Smilie
# 2  
Old 01-18-2014
Show us the commands you use to "see and copy the files" between the two directories.
# 3  
Old 01-18-2014
thx for your interest, I'm not sure how I can show you the code cause I use the xbmc copy, maybe with ssh acces or something like this.

for the moment I find this to choise only the younger files:

find . -ctime -1

I looking everywhere to find all thing I need after that still have to understand how mix all to creat a bash. Smilie

---------- Post updated at 03:09 PM ---------- Previous update was at 03:01 PM ----------

ssh files acces say :

programs included with Debian GNU/Linux system

maybe that can help
# 4  
Old 01-18-2014
This simple thing to do is take what you do manually and put it in a script.

If you will show us the commands you use to do it, we can help you write the script. If not; you're on your own.

We would expect you to change actual passwords in your code to something like "password" and that you could then figure out how to change that to your real password if we provide a solution for you. (We would also expect you to modify IP addresses, host names, user names, and other personal or private data.)

Last edited by Don Cragun; 01-18-2014 at 10:41 AM.. Reason: Fix typo
# 5  
Old 01-18-2014
get it, thank you.

I looking how to open command in the same time than xbmc, or save in .txt the commands for post the copy script. Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash to create sub directories from specific file extension

In the bash below I am trying to create sub-directories inside a directory from files with specific .bam extensions. There may be more then one $RDIR ing the directory and the .bam file(s) are trimmed (removing the extension and IonCode_0000_) and the result is the folder name that is saved in... (2 Replies)
Discussion started by: cmccabe
2 Replies

2. Shell Programming and Scripting

Problem with GREP + CUT - script for automatic update of STEAM GAME AR

Hello, I have a problem with the /etc/rc.d/init.d script to automatically update STEAM GAME ARK. I've converted 3 scripts into one, but something does not work correctly ... The problem is in the file latestavailableupdate.txt / line 36/39. It think the problem is with script, it wrongly... (2 Replies)
Discussion started by: kshishu
2 Replies

3. Shell Programming and Scripting

Create automated scan of specific directory using bash

I am trying to use bash to automate the scan of a specific directory using clamav. Having this in place is a network requirement. The below is an attempt to: 1. count the extensions (.txt, .jpeg) in a directory and write them to a virus-scan.log (section in bold) 2. scan each folder in the... (6 Replies)
Discussion started by: cmccabe
6 Replies

4. Shell Programming and Scripting

awk to update specific value in file with match and add +1 to specific digit

I am trying to use awk to match the NM_ in file with $1 of id which is tab-delimited. The NM_ will always be in the line of file that starts with > and be after the second _. When there is a match between each NM_ and id, then the value of $2 in id is substituted or used to update the NM_. Each NM_... (3 Replies)
Discussion started by: cmccabe
3 Replies

5. Shell Programming and Scripting

awk to create variables to pass into a bash loop to create a download link

I have created one file that contains all the necessary info in it to create a download link. In each of the lines /results/analysis/output/Home/Auto_user_S5-00580-6-Medexome_67_032/plugin_out/FileExporter_out.67... (8 Replies)
Discussion started by: cmccabe
8 Replies

6. Red Hat

RedHat 5 update 9 BASH update issue

Hi i want to update the BASH because of the "shell shock" vulnerability. my RedHat 5 is clean install with the default mirror site. when im running the command: yum update bash im getting a message saying there is no update. you can see in the attach picture... what am i doing wrong? is... (4 Replies)
Discussion started by: guy3145
4 Replies

7. Ubuntu

Automatic update script issue (Ubuntu server)

Hi, I've created a very basic script to run apt-get update and apt-get dist-upgrade unattended (run with cron) and save the logs. Though, it's not really a script, just a file containing the commands to run in order: pasteit .com/18601 I'm currently testing this and ran into some unexpected... (4 Replies)
Discussion started by: Raxje
4 Replies

8. Shell Programming and Scripting

Increase bash history size

Hi I am trying to increase the number of commands recorded in my .bash_history file. I followed what is indicated and have add to my .bashrc export HISTCONTROL=ignoreboth export HISTSIZE=1000000 export HISTFILESIZE=1000000 export HISTIGNORE='ls'but the .bash_history only contains 690... (5 Replies)
Discussion started by: louisJ
5 Replies

9. Shell Programming and Scripting

Automatic name file with increase

Hello, A file named c15a is registered on my disc all 10 minutes. I must rename that file with the actually Date and with an automatic increase number on 5 digits, so as : c15a.20070528.00001 and the next file will be : c15a.20070528.00002. The next day so tomorrow the five digits must be... (6 Replies)
Discussion started by: steiner
6 Replies
Login or Register to Ask a Question