10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have to check the files in another server using sftp to do that, below is the code i am going with
#!/bin/bash
export SRC_FOLDER=$1
export ARC_FOLDER=$2
HOST=as07u3456
USER=relfag
sftp ${USER}@${HOST} <<EOF
cd $SRC_FOLDER/DSCOR
ls
bye
EOF
echo "done"
whatever the files i... (8 Replies)
Discussion started by: ursrami
8 Replies
2. UNIX for Dummies Questions & Answers
Hey all,
I have a zip file which I received, and I need to replace one of the files inside of it.
I tried the obvious solution of unzipping the zip, replacing the file, and rezipping, but the following happened:
Original Zip Size: 79MB
Unzipped Size 80MB
New Zip: 36MB
When I feed the... (2 Replies)
Discussion started by: DeanLeitersdorf
2 Replies
3. Shell Programming and Scripting
Hi,
In sftp script to get files, I have to rename all the files which I am picking. Rename command does not work here. Is there any way to do this?
I am using #!/bin/ksh
For eg: sftp user@host <<EOF
cd /path
get *.txt
rename *.txt *.txt.done
... (7 Replies)
Discussion started by: jhilmil
7 Replies
4. Shell Programming and Scripting
Hi,
I have a test.zip archive that contains
test.zip --> (file_1.txt, file_2.txt , file_3.txt)
I need to unzip the file like this,
file_1_timestamp.txt
file_1_timestamp.trg
file_2_timestamp.txt
file_2_timestamp.trg
file_3_timestamp.txt
file_3_timestamp.trg
Could you please let me know... (7 Replies)
Discussion started by: Shandel
7 Replies
5. UNIX for Dummies Questions & Answers
Hi there, I am very new to unix and having trouble with a fairly simple statement:
cd /user
ls -t -c1 | sed -ne '11,$p' | mv xargs archive/
What I want the code to do is sort all files in a directory by timestamp, select all of the files after the 10th file, and then move those files... (3 Replies)
Discussion started by: DSIReady
3 Replies
6. Shell Programming and Scripting
Hi All
I have a folder that contains hundreds of file with a names
3.msa
4.msa
21.msa
6.msa
345.msa
456.msa
98.msa
...
...
...
I need rename each of this file by adding "core_" in the begiining of each file such as
core_3.msa
core_4.msa
core_21.msa (4 Replies)
Discussion started by: Lucky Ali
4 Replies
7. Shell Programming and Scripting
script for to take files from FTP server to UNIX server and Unzipped that files (1 Reply)
Discussion started by: sunilamarnadh
1 Replies
8. UNIX for Dummies Questions & Answers
I have some log files that have been gzipped and then compressed using cpio.
There are a number of log files that have been compressed to the one file.
When I extract them the date of the file when doing an ls -la is today's date (the date I extracted them).
Is there anyway to see the date... (3 Replies)
Discussion started by: Sepia
3 Replies
9. UNIX for Dummies Questions & Answers
Hi All,
Is there is a way to do this in a single unix command
I have unzipped some files into a directory ..
I want to check the count of the files in the directory and also i need to check whether the files is having read permision or not.. I know it can be done by a script isthere... (4 Replies)
Discussion started by: arunkumar_mca
4 Replies
10. UNIX for Dummies Questions & Answers
Is there a way you can tell if a file
is still zipped or it's unzipped
I have a file called ssss.zip and I would like to know if this file is still zipped or if it's unzipped?
I'm on IBM AIX/RS6000 (3 Replies)
Discussion started by: ted
3 Replies