03-05-2011
Dear Corona,
Thanks for your response ....Please see my comments below about the issue , I am sure you people can help me out to resolve this long issue
ls invoice/INVOICE*.xml >> filelist.txt ( Here I am getting the file list like invoice/INVOICE20110301-113424-950.XML here i will need to cut "invoice/" from the file list but thi is not the right place , Because it will not remove for all the files )
while read N
do
echo >>todo.lst rm $N ( I have to cut/remove "invoice/" from invoice/INVOICE20110301-113424-950.XML some where in this loop and add remote directory )
done < filelist.txt
echo >>todo.lst quit
sftp ..........@........... < todo.lst
rm /home/............../DEV/HCL/&N
rm todo.lst
rm filelist.txt
Thanks in advance,
Vinay.
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi,
I accidentally deleted a big directory with all its sub-directories and bunch of source code files which I have been developing for about 2 years... What will I do now, how can I retrieve my files, directory hierarchy back ???
If anyone, please HELP ! ! ! ... (4 Replies)
Discussion started by: milhan
4 Replies
2. Shell Programming and Scripting
i have the following problem:
use shell script:
Two directories have to be searched for files havin the same name.
then delete these files from one of these directories.
the directory names have to be accepted as command line arguments.
what i have done till now is:
1. run a loop... (1 Reply)
Discussion started by: onlyc
1 Replies
3. Shell Programming and Scripting
Hello Gurus,
I want to delete only empty files (files with 0 bytes) at once from the local directory. Rightnow I need to go through all the files one by one manually and check the empty files before deleting them. Is there any unix command that finds and deletes empty files in a directory?... (5 Replies)
Discussion started by: berlin_germany
5 Replies
4. UNIX for Dummies Questions & Answers
I have a directory full of text data files.
Unfortunately I need to get rid of the 7th and 8th line from them all so that I can input them into a GIS application.
I've used an awk script to do one at a time but due to the sheer number of files I need some kind of loop mechanism to automate... (3 Replies)
Discussion started by: vrms
3 Replies
5. Linux
Hi Guys,
I want to know wheather it is possible to delete directory not files,
Example:
In one directory there are 10 dirs and 100 files but my req is to delete only dirs not file
Wheather it is possible ? (13 Replies)
Discussion started by: manoj.solaris
13 Replies
6. UNIX for Dummies Questions & Answers
I have a file inside abc/def/ghi directory. let say a.txt
I need to delete this a.txt from abc itself.
I have tried
ls /abc/def/ghi | xargs rm -r
its saying
rm: a.txt non-existent
also tried rm -rf /def/ghi
but in vein. plz help :) (2 Replies)
Discussion started by: gotam
2 Replies
7. Shell Programming and Scripting
Hi All,
I want to search for .log files from folders and sub folders in remote server and FTP them to one particular folder in the local machine. I dont want to copy the entire directory tree structure, just have to take all the .log files from all the folders by doing a recursive search from the... (3 Replies)
Discussion started by: dassv
3 Replies
8. Shell Programming and Scripting
Hi
Can someone assist in writing a script.
I have a filesystem named /sybase in my aix lpar.
When this filesystem becomes 94% full all the files and directories under /sybase/logs should be deleted immediately. :confused: (7 Replies)
Discussion started by: newtoaixos
7 Replies
9. Shell Programming and Scripting
I have 4 files in a directory and want to delete only first 2 files only..
$ ls -ltr
total 640
-rw-r--r-- 1 user other 148779 Oct 12 10:50 file1.xls
-rw-r--r-- 1 user other 148779 Oct 12 10:50 file2.xls
-rw-r--r-- 1 user other 148779 Oct 12 10:50 file3.xls... (4 Replies)
Discussion started by: giridhar276
4 Replies
10. Shell Programming and Scripting
I have a qnap TS259 that is running ubuntu. Have successfully setup back scripts that are initiated by cron.
I would like to create a couple scrypts that would operate on the recycle bins for both drives. Just want to be able to run the script manually that would walk through both directories... (13 Replies)
Discussion started by: mackconsult
13 Replies
uux(1c) uux(1c)
Name
uux - unix to unix command execution
Syntax
uux [-] command-string
Description
The command gathers 0 or more files from various systems, executes a command on a specified system, and sends standard output to a file on
a specified system.
The command-string is made up of one or more arguments that look like a shell command line, except that the command and file names may be
prefixed by system-name!. A null system-name is interpreted as the local system.
File names may be one of the following:
o A pathname
o A pathname preceded by ~xxx, where xxx is a userid on the specified system and is replaced by that user's login directory
o Any other syntax that is prefixed by the current directory.
For example, the following command line gets the f1 files from the usg and pwba machines, executes a command and puts the results in
f1.diff in the local directory.
uux "!diff usg!/usr/dan/f1 pwba!/a4/dan/f1 > !f1.diff"
When using special shell characters such as <>'!, you should either quote the entire command-string, or you should quote the special char-
acters as individual arguments.
The command attempts to get all files to the execution system. If both the file and command are located on different remote sites, the
file is first brought to the local system and is then transferred to the execution system.
If you want to include files as arguments to a command, but you do not want those files to be processed by enclose the filename in paren-
theses. For example:
uux a!uucp b!/usr/file (c!/usr/file)
The previous example sends a command to system The is transferred from system to the local system, and then is passed to system When
arrives at system the command executes and sends to system
If the request is not allowed on the remote system, the command notifies you. This response is sent through remote mail from the remote
machine.
Options
-c, -l
Do not copy local file to the spool directory for transfer to the remote machine. This is the default.
-ggrade
Specifies the grade which is a single letter or number from 0 to 9, A to Z, or a to z. The highest grade is 0, the lowest grade is z.
The default is A. Lower grades should be specified for high-volume jobs, such as news.
-n Sends no notification to user.
-p, -
Reads stdin.
-r Queues the job, but does not start the file transfer.
-xdebug
Produces debugging output on stdout. The debug option is a number between 0 and 9. Higher numbers provide more detailed information.
Debugging is permitted only for those users with read access to
-z Notify the user if the command fails.
Warning
An installation may limit the list of commands executable on behalf of an incoming request from Typically, a restricted site permits little
other than the receipt of mail through
Restrictions
Only the first command of a shell pipeline may have a system-name!. All other commands are executed on the system of the first command.
The use of the shell metacharacter asterisk (*) shell metacharacter may not behave as you expect. The shell tokens (<< >>) are not imple-
mented.
You are not notified when execution on a remote machine is denied. Only commands listed in on the remote system are executed at the remote
system.
Files
/usr/spool/uucp spool directory
/usr/lib/uucp/* other data and programs
See Also
uucp(1c)
"Uucp Implementation Description" ULTRIX Supplementary Documents Vol. III: System Manager
uux(1c)