Issue File Extension is file Size


 
Thread Tools Search this Thread
Special Forums IP Networking Issue File Extension is file Size
# 1  
Old 09-02-2010
Error Issue File Extension is file Size

I am currently experiencing the file size being added to the file extension when transfering information from Command Line Client to a UNIX server. Does anyone know why this is happening and how do I stop the file size being added to the file extension.


Example: football.pqt.11108
football.pqt is the corect way and how I wont the file to be transfered. How do I remove the .11108 which is the same as the file size?
# 2  
Old 09-02-2010
I am wondering why this is doing in "IP Networking". Anyway
Quote:
when transfering information from Command Line Client to a UNIX server
From what OS with which command line client are you transfering? ftp? scp? ...?
This doesn't look like a default function of a Linux or Unix ftp client or scp etc.

Basically you can get rid of the suffix by issuing something like:
Code:
$> echo football.pqt.11108| sed 's/\.[^\.]*$//'
football.pqt

Put it together with a mv command, maybe in a while/read loop.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Rename specific file extension in directory with match to another file in bash

I have a specific set (all ending with .bam) of downloaded files in a directory /home/cmccabe/Desktop/NGS/API/2-15-2016. What I am trying to do is use a match to $2 in name to rename the downloaded files. To make things a more involved the date of the folder is unique and in the header of name... (1 Reply)
Discussion started by: cmccabe
1 Replies

2. UNIX for Dummies Questions & Answers

File Extension Missing in file-$var.csv

I'm afraid this is a silly question but I can't figure it out. I have a script like so... echo "Enter DRDL Signature Version Number" read DRDL_Number mv signature_output.csv SERVICE_OBJECTS_S-$DRDL_Number.csv The resultant filename does not contain the .csv as follows.... (3 Replies)
Discussion started by: Cludgie
3 Replies

3. HP-UX

Performance issue with 'grep' command for huge file size

I have 2 files; one file (say, details.txt) contains the details of employees and another file (say, emp.txt) has some selected employee names. I am extracting employee details from details.txt by using emp.txt and the corresponding code is: while read line do emp_name=`echo $line` grep -e... (7 Replies)
Discussion started by: arb_1984
7 Replies

4. UNIX for Dummies Questions & Answers

How to get size of a list of files with specified extension?

Command ls -l *cpp lists all cpp program files in a directory. It shows the size of each file. Using a calculator to work out the total size of the cpp files would be very tedious. Is there a way to get the total size from the command line? (5 Replies)
Discussion started by: resander
5 Replies

5. UNIX for Dummies Questions & Answers

creating separate directories according to file extension and keeping file in different directory as

unix program to which a directory name will be passed as parameter. This directory will contain files with various extensions. This script will create directories with the names of the extention of the files and then put the files in the corresponding folder. All files which do not have any... (2 Replies)
Discussion started by: Deekay.p
2 Replies

6. Shell Programming and Scripting

Extracting file name and finding extension of the file

Hi., How to extract the extension of a file which are present in the directory?. In my script I tried something like: echo abc_ss_222_54.txt | awk -F"" '{print $5}' But I din't got .txt echoed in console. Pl. suggest a solution for this. And also, for finding a specific... (1 Reply)
Discussion started by: IND123
1 Replies

7. Solaris

File size issue in Sol 5.9

Hi Gurus, An Application is not able to create files above 2.14gb in size in my Sol5.9 server. I have checked the file limit of the user running the Application and am attaching the same: boiadm: ulimit -a time(seconds) unlimited file(blocks) unlimited data(kbytes) ... (4 Replies)
Discussion started by: Hari_Ganesh
4 Replies

8. Shell Programming and Scripting

file size comparision local file and remote file

Hi, I have written a script which would FTP a dump file to the FTP server and log the whole activity into a file. to confirm the success of the file copy i grep for "226 file receive OK" and then send out an email saying success. Now i want to make sure the bytes of the local file and... (4 Replies)
Discussion started by: dba.admin2008
4 Replies

9. Solaris

command to find out total size of a specific file size (spread over the server)

hi all, in my server there are some specific application files which are spread through out the server... these are spread in folders..sub-folders..chid folders... please help me, how can i find the total size of these specific files in the server... (3 Replies)
Discussion started by: abhinov
3 Replies

10. UNIX for Dummies Questions & Answers

How to append a file extension to end of a file name??

Hi, I have a .txt file and it contains some file names.I want to append .gz extension to all the file names that are present within the .txt file. Input. aa.bb.Mar-20-2007 aa.cc.Mar-20-2007 Output aa.bb.Mar-20-2007.gz aa.cc.Mar-20-2007.gz Please help me with this command. ... (10 Replies)
Discussion started by: kumarsaravana_s
10 Replies
Login or Register to Ask a Question