![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert. |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Once a file is ftped to a server is there a way that you can prevent that file from being overwritten if the same process tries to ftp a file with the same name again?
|
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
ftp doesn't directly provide a way to stop that.
Some ftp versions support the "!" operator which allows remote execution of a shell command - which is not very secure. Anyway, consider something like this. [code] !/bin/chmod 000 filename [/codee] |
|
#3
|
|||
|
|||
|
Thanks
thank you.
|
|
#4
|
||||
|
||||
|
Many more ftp servers support the chmod command. If your client does not support
chmod 444 filename you can still try the site command: site chmod 444 filename Jim, I have never seen that ! stuff on any ftp server. Where did you see it? |
|
#5
|
|||
|
|||
|
Some of the original versions of ftp come from Washington State University - and it supports the bang operator - it was undocumented.
I'm just showing my age. The site command is in fact much more common now. |
|
#6
|
||||
|
||||
|
Quote:
Last edited by google; 12-24-2004 at 06:46 AM. |
|
#7
|
|||
|
|||
|
Hi,
Yes, Google is absolutely Right. The '!' allows you to have a (cofee-)break with the FTP and enter in to shell from where you can return back (just for time being if you wish) with the exit command at the shell. This takes you to shell while still ftp being running, and you can return back by just typing exit at the console/shell prompt. Since '!' takes you to the shell, and you can execute any shell command as usual, you can do the same (execute any shell command) with out completely coming out of FTP. In simple, from the FTP application itself, you can execute any valid shell command by just prefixing the command with a Bang ('!'). Ex:- ftp> !ls -l or ftp> !who or ftp> !man ftp etc., This way you can avoid un-necessarily going out and comming in of FTP just for executing some command at shell. And this is supported in all most all of the Unix Flavours. And even Microsoft Windows also holds good with this concept. Vishwa. |
|||
| Google The UNIX and Linux Forums |