Programming :: Made A Shell Script To Copy And Delete Files Through FTP?

Feb 13, 2011

I have made a shell script to copy and delete files through FTP.I want to first delete all txt files and then mput all txt files.

Code:
ftp ()
{

[code]....

View 6 Replies


ADVERTISEMENT

Programming :: Write Shell Script For Copy Files?

Mar 25, 2010

write shell script for copy files to usbdąsk that cosist of very long argument like "2009025_efkl".

View 1 Replies View Related

Programming :: Shell Script To Automatically Delete Files With The Same Name As The Parent Directory?

Mar 18, 2010

I am facing a problem in Windows due to a virus called Newfolder.exe which creats files with the same name as it's parent directory and an extension .exe and this happens for every directory in the entire hierarchy in the infected pen drive. The antivirus detects them, but is sucking slow. So I thought this is a good opportunity to use the concepts of the all mighty shell script to remove those as they follow the same pattern. Say my complete path is

Code:

/home/pkd/fol1/

The virus would have created an file with complete paths

Quote:

/home/pkd/fol1.exe

If fol1 has two more directories fol11 and fol12 Then there would be two more .exe(virus created) in the following path

Quote:

/home/pkd/fol11/fol11.exe
/home/pkd/fol12/fol12.exe

View 1 Replies View Related

Programming :: Shell Script To Delete Files Which Location Should Be Read From Log File

Jun 26, 2010

I have 2 external hdd in wich I have all my files. yesterday, I have copied all the files from hdd2 to hdd1 and I want to eliminate duplicates so I used FSLint to find them,now I want to make a shell script to delete all the files/entries (read from the log file) that begin with.

View 14 Replies View Related

Programming :: Create/delete Temp/backup Files Through A Shell Script?

Dec 31, 2008

I have a shell script that need to create some files:

1) backup files of user passed in file ( that will be written by this shell ).

2) temp files that the shell will create and later delete/remove.

This shell script will be used from my local dir ( I am not a super or a sysadmin ). Users of this shell will call this script to run on their local files in their respective directories. When my script runs, it errors with the following:

cp: cannot create regular file `./listfile.txt.backup': Permission denied
/home/myUser/tools/myShellScript: line 12: listfile.txt: Permission denied

for the temp I was able to avoid this error by creating the temp file in the /tmp directory. All I want is for this shell script to run, create/modify/backup files in user's local dirs.

The user dir has the following permission:

drwxr-xr-x testDir

the file that needs to be backed-up has:

-rw-r--r-- listfile.txt.

View 7 Replies View Related

Programming :: Finding A Shell Script To Delete Files Which Location Should Be Read From A Log File?

Jul 16, 2011

I have 2 external hdd in wich I have all my files.... yesterday, I have copied all the files from hdd2 to hdd1 and I want to eliminate duplicates so I used FSLint to find them, now, I have a txt file that looks like this:

Code: /media/My Book/!!!MIS DOCUMENTOS/Documentos/2 sep2003-jun2009 USB/!TESIS/TESIS/TESIS CVT LABVIEW Y CODEWARRIOR/LabVIEW85RuntimeEngineFull.exe /media/My Book/HDD_Toshiba/Borrable/Pen_Drive_4GB/Tesis/Super CD de la tesis/LabView/LabVIEW85RuntimeEngineFull.exe multiplied by millions of entries...

now I want to make a shell script to delete all the files/entries (read from the log file) that begin with:

Code:

/media/My Book/HDD_Toshiba/**** Since HDD_Toshiba is the folder in hdd1 (MyBook) that contains all the files from hdd2

View 1 Replies View Related

Programming :: Shell Script To Copy Newly Changed Files With Rsync?

Apr 20, 2010

I've got quite a decent rsync script setup, however I'd like to invoke it whenever there's change to a file. My initial idea was to use find, however this has two major flaws - the first being my particular unix veriant cant understand -print0 which means this doesn't work, the second is that I'm not 100% sure how to put variables into quotation marks so ls can understand the target:

Code:

for i in `find /shares/ -mtime -1 -print`; do ls -ltr $i;done

View 14 Replies View Related

Programming :: Shell Programming - Delete User Input

Jan 21, 2011

I recently started shell programming and my task now is to do a menu display.Currently i am stuck whereby user will input both title and author and it will delete it.

Do i have to use sed command?

View 4 Replies View Related

General :: Cannot Copy,cut,paste And Even Delete Files?

Mar 16, 2010

I just installed Fedora11 with the KDE desktop and completed a yum update. Every time i try to copy and paste files and even delete files from a file manager or my desktop, I get this error:Quote:Could not start process Unable to create io-slave:klauncher said: Error loading 'kio_trash'.or thisQuote:Could not start process Unable to create io-slave:klauncher said: Error loading 'kio_file'.orQuote:Could not start process Unable to create io-slave:klauncher said: Error loading 'kio_desktop'.Current KDE version is 4.2.2

View 2 Replies View Related

Ubuntu :: Create A Folder Where You Can Copy Files To But You Can't Delete Them After?

Nov 24, 2010

i'm confronting atm. I need to create a folder where ppl can copy files and i need to be sure that those files cannot be deleted after they are copied there. The folder will be accessed over network, and i need to be sure no one will delete somebody else's files.Also i need to tell you that i'm working with regular users, so creating a folder for each user and chown/chmod-ing it won't do the trick(allready tried and ended up with a whole lot of files in the parent directory).I also tried chattr +a but that doesn't allow them to write new files in the folder.

View 2 Replies View Related

Ubuntu :: Copy All Of My Files Using Shell?

Feb 16, 2011

Well my drive has errors where i can't mount it using a GUI but it will mount and let me see my files using shell or w/e it is that i'm using while in recovery mode. I have manage to change my directory to the one that has ALL of the files that i want and need to copy. I was wondering whats the easest way to copy ALL of the files which are like 20 GB onto my 500 GB external HDD? and How will i know everything is done copying?

View 2 Replies View Related

General :: Write A Shell Script That Will Delete All The .dat Files?

Apr 21, 2011

i have to write a shell script that will delete all the .dat files in /var/oracle/etl/incoming which the created date of the file is 7 days before the currrent date.

View 8 Replies View Related

Ubuntu :: Can't Delete, Copy Or Move Files - Permission Denied?

Jul 20, 2010

I can't perform any of those.Except from the Terminal.I didn't edit any permission... nor installed anything.Don't know what to do.Also, "Move to Trash" appears grayed out, in the right-click menu (for all the files/folders).

View 8 Replies View Related

Programming :: Delete A Line From File Using Shell Script?

Oct 16, 2010

i have a file containing contents as

1 2 3
2 2 3
11 2 3

now i want to delete the line which first column content is 1. so, if i pass the parametere 1 to function delete_row. is should remove the first row as

2 2 3
11 2 3

and then write the contents in file.

View 2 Replies View Related

Programming :: Shell Script To Delete File If It Exists

Aug 10, 2010

I am writing a shell script to delete a file if it exists.

View 11 Replies View Related

Programming :: Handle Own Made Include Files In Order To Compile Program In SUSE 11.3?

May 1, 2011

I have made two source files named as sum.c and average.cI have included sum.c in average.c
both files in Documents directory.when i compile average.ot followingerror"average.c:4:22: fatal error: sum.c: No such file or directorycompilation terminated.How to solve this issue?I have tried to copy sum.c to usrinclude folder but unable to copy

View 8 Replies View Related

Programming :: Search File By Pattern And Then Delete Corresponding Lines In Shell?

Sep 16, 2010

I have such a file(test.txt):

abc 123 456
abc 256 145
axd 125 225

[code]...

View 8 Replies View Related

General :: Shell Script To Delete Old Files Whenever Storage Limit Is Crossed?

Mar 16, 2010

I am looking for a shell script to delete old files whenever storage limit is crossed for a folder.

View 1 Replies View Related

General :: Shell Script To Delete Folders And Files Dynamically And Recursively?

Jun 7, 2010

I have an archive directory that needs to be cleaned up once per quarter. The top level (/data/archive/*) directory names change daily, as well as the subdirectories and the filenames (the application names everything according to date). Also, there are two top level directories, bin and incoming, that we can't touch. I want to write a shell script that loops through the 15 or 20 top level directories and deletes all files and subdirectories older than 3 days (skipping the bin and incoming folders). Can someone get me started on a script? I am kinda new to shell scripting.

View 2 Replies View Related

General :: Shell Script To Search For Files Of Specific Extension And Delete Them All?

Mar 17, 2010

i want such a shell script or single line command to delete all the files with extension specified in script i have bash !! ex... delete all files of extension .obj

View 4 Replies View Related

Programming :: Write A Shell Script Which Will Check A File Name In A Dir And Copy It?

Apr 2, 2010

I am a novice to the shell script. In my system from db server the log files are enerating with the name log1.txt,log2.txt..... It is capable of keeping 10 files at a time in dir called /db/sis/log1.txt. I want to copy the log1.txt to another directory when ever it generating by attaching the time stamp to it for the back-up purpose. this files will be there for a period of 24 hours. after that the back-up dir should be cleared and it start copying again the fresh file from the same dir.

View 3 Replies View Related

Programming :: Shell Script To Delete Part Text Of A Line If Pattern Matches?

Apr 12, 2010

I am trying to create a shell script, on taking a input file as parameter, which need to do 3 things

1) create a copy of existing file.

2) add a new line to the copied file.

3) strip off all the absolute paths inside the copied file

The first 2 points are straight forward. but i am finding it difficult to acheive the 3rd point. myself not very good with awk and sed. but gave it a shot in vain. For example, the input script consists of below,

PROGRAM=`/usr/bin/basename $0`
HOST=`/usr/bin/uname -n`
echo Start $PROGRAM `/usr/bin/date` |
/usr/bin/tee -a $LOG

The output of the script should look like,

PROGRAM=`basename $0`
HOST=`uname -n`
echo Start $PROGRAM `date` |
tee -a $LOG

View 14 Replies View Related

General :: Finding A Recursive Shell Or Perl Script To Delete Files With The Same Name As The Parent Folder?

Jun 29, 2010

is there a recursive shell or Perl script to delete files with the same name as the parent folder? i wish to include the starting folder name as argument to the script.

View 2 Replies View Related

Programming :: Shell Script To Copy Database Archivelogs Sequentially From One Directory To Another?

Jun 2, 2009

want to write a shell script to copy database archivelog files sequential from one directory to another directory within a server. I am hereby enclosing the sample archivelog file name. Archive log filename : log_0000118432_1.arc (Here number 0000118432 will be sequentially incremented by 1 for next filename). Here the catch is all Archivelogs must be copied to destination directory. Previously copied files should not be copied.

View 3 Replies View Related

Fedora :: Delete A Made Duplicate Post?

Oct 27, 2010

I couldn't find my previous posting about udev at booting, so I created a new posting with the same material. Subsequently my earlier post showed up again----or I managed to find it. I can't seem to find any information about how I go about deleting the earlier post. Supposedly we are supposed to be able to notify the managers of abusive posts. I thought I might use that to ask them to delete the earlier post, so I will try that..

View 6 Replies View Related

Ubuntu :: LAMP Server - Can't Delete Made Account

Jan 26, 2011

Alright I have just got done installing Ubuntu 10.10 and Lamp, now I know I need to move all my website files to Var/WWW. Well there is a little problem, when I try to delete the two test pages or even edit them. Ubuntu tells me i do not have permission. And what confuses me the most is i installed the damn OS and i was the first account made one it i am an admin and i still cant delete

View 5 Replies View Related

Server :: Copy/delete Files On Remote Server?

Jul 6, 2010

Allright, I made a simple script that tarballs my SQL databases weekly and saves them to a backup harddrive.If possible, I would like to have the backups uploaded to a remote server for storage. But, I must have the script delete the previous upload for size contraints.I can only use rsync, scp or sftp. Haven't used any of them really before... Here's my basic tarball-backup script:

Code:
#/bin/sh
# Dates the new tarballs of current builds.
DATE=`date +%m_%d_%Y`

View 8 Replies View Related

Programming :: Copy Big Files Using Tar?

Sep 13, 2010

I am trying to copy content of single folder to multiple destination simultaneously using tar and FIFO. here is the source code

mkfifo bin1.fifo
tar -C bin -cf - . | tee bin1.fifo | tar -C bin2 -xf - &
tar -C bin1 -xf bin1.fifo

[code]....

View 1 Replies View Related

Programming :: Delete A Specific Range Of Files?

Aug 13, 2010

I have 50 files in the following format.

fileone.0001.txt
filetwo.0002.txt
filethree.0003.txt

[code]...

View 4 Replies View Related

Programming :: Delete Files Older Than 7 Days?

Jan 3, 2011

I am new to unix, I am looking for a script to delete files older than 7 days but i also want to exclude certain directories (like arch,log .....) and also some files with extensions ike .ksh, .ch, ..............) in directories and sub directories

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved