LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-13-2011, 10:32 PM   #16
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959

Here are a couple of good find tutorials:

http://mywiki.wooledge.org/UsingFind
http://www.grymoire.com/Unix/Find.html

The second one is more detailed, but is based on older unix-based versions of find. GNU find has many additional features not found in these older versions.
 
Old 08-14-2011, 08:38 AM   #17
Amerika
LQ Newbie
 
Registered: Dec 2010
Posts: 18

Original Poster
Rep: Reputation: 0
What is my problem is to show where are the files on the remote server!

Easy to make an local find command like :
Code:
find . -mtime +7 -exec rm {} \;
But how can i use this command on to an remote computer from the local computer?
 
Old 08-14-2011, 11:11 AM   #18
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 18,811

Rep: Reputation: 4190Reputation: 4190Reputation: 4190Reputation: 4190Reputation: 4190Reputation: 4190Reputation: 4190Reputation: 4190Reputation: 4190Reputation: 4190Reputation: 4190
Quote:
Originally Posted by Amerika View Post
What is my problem is to show where are the files on the remote server!

Easy to make an local find command like :
Code:
find . -mtime +7 -exec rm {} \;
But how can i use this command on to an remote computer from the local computer?
As was suggested to you earlier in the thread:
Quote:
Originally Posted by schneidz
my advice to you would be to mount the directory on the server using something like sshfs and running the find command from cron.

i.e.- try to use the insecure, deprecated, featureless ftp as least as possible.
Using FTP is old and insecure. If you use it, you're limited by it. Again, mount the remote system as another file system (either use sshfs or nfs), and then you have the ability to use any command/utility you'd like.

Last edited by TB0ne; 08-14-2011 at 11:13 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How to Write & Call Functions Within Shell Scripts senthilmuthiah Linux - Newbie 2 03-27-2009 06:36 PM
How to properly exit functions in Shell Script? Jude Terror Programming 5 01-27-2009 03:15 PM
How to ssh from a shell script ? For ppl who can write shell scripts. thefountainhead100 Programming 14 10-22-2008 06:24 AM
passing parameters to functions in shell script kushalkoolwal Programming 1 09-28-2005 02:40 PM
shell script functions iNET_boss Linux - General 1 08-10-2005 04:41 PM


All times are GMT -5. The time now is 08:48 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration