03-06-2011
script to check if file was downloaded
I want to create a script to check if a file was downloaded into a folder. if it was i dont want to re-download it.
The requirement is as follows.
The first time the file (filename: A) is downloaded, it is renamed by stripping off part of the filename to filename A22.
The second time an attempt is made to download file A, it should not be downloaded, since it was downloaded and renamed already to A22.
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I wish to seach a Dir for a specific file, once the file is found i will perform additional logic. If the file is not found within two hours, i would like to exit.
Logically, I'm looking for the best way to approach this
Thanks for any assistance in advance.
Note: I'm using a C shell and... (2 Replies)
Discussion started by: mmarsh
2 Replies
2. UNIX for Dummies Questions & Answers
Let me start by saying I am at a VERY beginner level in terms of UNIX/FTP/etc.
Someone loaded a file onto a server for me and zipped it using gzip.
I accidentally downloaded the file without using "binary".
I now have a "filename.txt.gz" sitting on my computer that I need
to unzip. Is... (2 Replies)
Discussion started by: UDcc123
2 Replies
3. UNIX for Advanced & Expert Users
Hi All,
I'm developing a FTP script as below:
ftp -v -n <IP_ADDRESS> << EOF
user avery jSqaqUU2
lcd /directory/folder/
ascii
prompt
mget *
bye
EOF
I would like to enhance the script to count the total file downloaded. For example, once the script run i want the message "Total <n>... (1 Reply)
Discussion started by: cas553
1 Replies
4. Shell Programming and Scripting
I will have two files (which were in .txt format) ftp'ed to a specified directory, from where my ksh picks up each file at a time and starts processing it. So i need to write a script which as soon as find a file should check wheather it is download completely or not. If it is still downloading... (2 Replies)
Discussion started by: vpv0002
2 Replies
5. Shell Programming and Scripting
Hi,
I am looking for a shell script with the following.
1. It should check whether a particular file exists in a location
#!/bin/sh
if ;
then
echo "xxx.txt File Exists"
else
echo "File Not Found"
fi
2. If file exists, it should check for the modified date and run a command... (2 Replies)
Discussion started by: karthikeyan_mac
2 Replies
6. Programming
I need to
"Ensure that when you download libchat.a from the VLE you have copied it to the same folder on ius as your source files. You then refer to the library (and the libraries it needs) with:
gcc -o outputfile sourcefile.c -L. -lchat -lsocket -lnsl"
But I have no idea what this means! (I... (2 Replies)
Discussion started by: fakuse
2 Replies
7. UNIX for Advanced & Expert Users
Hi
I tried a tool called mediainfo
> brew info media-info
media-info 0.7.51
http://mediainfo.sourceforge.net
Depends on: pkg-config
/usr/local/Cellar/media-info/0.7.51 (3 files, 14M)
http://github.com/mxcl/homebrew/commits/master/Library/Formula/media-info.rb
Got details from a test... (3 Replies)
Discussion started by: slashdotweenie
3 Replies
8. Shell Programming and Scripting
I have around 100 html files and in each html file I have 5-6 such paragraphs of a company and I need to extract the Name of the company from either the one after "title" or "/company" and then the number of employees and finally the location .
<div class="search_result">
<div... (1 Reply)
Discussion started by: gubbu
1 Replies
9. UNIX for Dummies Questions & Answers
Hi,
Recently we migrated an application in HP UX to Linux. The files(scripts & logs)download from HP UX coming in a formatted way in MS notepad. However the files in Linux are not in correct format in MS notepad(No spaces , some spl symbols like square).We tried both ASCII and binary but no... (2 Replies)
Discussion started by: nag_sathi
2 Replies
LEARN ABOUT MOJAVE
softwareupdate
softwareupdate(8) BSD System Manager's Manual softwareupdate(8)
NAME
softwareupdate -- system software update tool
SYNOPSIS
softwareupdate command [args ...]
DESCRIPTION
Software Update checks for new and updated versions of your software based on information about your computer and current software.
Invoke softwareupdate by specifying a command followed by zero or more args.
softwareupdate requires admin authentication for all commands except --list. If you run softwareupdate as a normal admin user, you will be
prompted for a password where required. Alternatively, you can run softwareupdate as root and avoid all further authentication prompts.
The following commands are available:
-l | --list
List all available updates.
-i | --install
Each update specified by args is downloaded and installed. args can be one of the following:
-r | --recommended
All updates that are recommended for your system. These are prefixed with a * character in the --list output.
-R | --restart
Automatically restart (or shut down) if required to complete installation.
-a | --all All updates that are applicable to your system, including those non-recommended ones, which are prefixed with a -
character in the --list output. (Non-recommended updates are uncommon in any case.)
item ... One or more specified updates. The --list output shows the item names you can specify here, prefixed by the * or -
characters. See EXAMPLES.
-d | --download
Each update specified by args is downloaded but not installed. The values of args are the same as for the --install command.
Updates downloaded with --download can be subsequently installed with --install, or through the App Store (as long as they remain
applicable to your system). Updates are downloaded to /Library/Updates, but are not designed to be installed by double-clicking
the packages in that directory: always use --install or the App Store to actually perform the install.
--ignore identifier ...
Manages the per-machine list of ignored updates. The identifier is the first part of the item name (before the dash and version
number) that is shown by --list. See EXAMPLES.
--reset-ignored
Clears the per-machine list of ignored updates.
--schedule on | off
Manages the per-machine automatic (background) check preference.
-h | --help
Print command usage.
EXAMPLES
The following examples are shown as given to the shell:
softwareupdate --list
Software Update Tool
Finding available software
Software Update found the following new or updated software:
* MacBookAirEFIUpdate2.4-2.4
MacBook Air EFI Firmware Update (2.4), 3817K [recommended] [restart]
* ProAppsQTCodecs-1.0
ProApps QuickTime codecs (1.0), 968K [recommended]
* JavaForOSX-1.0
Java for OS X 2012-005 (1.0), 65288K [recommended]
sudo softwareupdate --install JavaForOSX-1.0
Software Update Tool
Finding available software
Downloading Java for OS X 2012-005
Downloaded Java for OS X 2012-005
Installing Java for OS X 2012-005
Done with Java for OS X 2012-005
Done.
sudo softwareupdate --ignore JavaForOSX
Ignored updates:
(JavaForOSX)
sudo softwareupdate --schedule
Automatic check is on
Mac OS September 11, 2012 Mac OS