Sponsored Content
Full Discussion: Filesize not working
Top Forums Shell Programming and Scripting Filesize not working Post 302225097 by akeenabawa on Thursday 14th of August 2008 02:27:19 PM
Old 08-14-2008
Although the 'rm -i' command from vidyadhar85 does work. I want it to display the directory contents one-by-one than ask me to delete.
I changed the 'FILESIZE=' to the new one posted by shamrock but it goes through the current directory first than the directory I listed on the command line, command is ./file-info mytestdir
It's supposed to go through the optional directory not both. What's going on?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

filesize

I know in php if you use the function filesize it will return the size of the file in bytes, but is there an easy way to get the size in MB. Cheers (2 Replies)
Discussion started by: jmg5
2 Replies

2. Shell Programming and Scripting

FileSize ???

How do I identify if there is any content in a file? If there is nothing in a specified file, I'd like to send an email indicating that there is nothing to report. Any help appreciated. (3 Replies)
Discussion started by: Cameron
3 Replies

3. UNIX for Dummies Questions & Answers

Sorting ls by filesize

I saw some stuff in the search results on this - but nothing specific..... I have a significant number of files (c. 300) which are output from a large process that I run. These are compared with a 'baselined' set of files - so I can quickly see if there are differences based on the sizes of the... (2 Replies)
Discussion started by: peter.herlihy
2 Replies

4. Shell Programming and Scripting

How to truncate as filesize?

Hello everybody it's me again. I have a procces that is writing in a 'file1' automatically but i want to truncate 'file1' to a filesize 'x' that mean if the 'file1' size is 'x' i want to delete the first lines while the last lines are being writed, that have sence? in the process are an... (1 Reply)
Discussion started by: Lestat
1 Replies

5. UNIX for Dummies Questions & Answers

UNIX and filesize

Hey guys. What I need to do is this: I need to find files that have a certain filesize (for this case a file size of 0 (zero) ) When I find this file with a filesize of zero I need to echo a statement that tells the user to delete it and not to delete it if the filesize is greater than... (3 Replies)
Discussion started by: ndoggy020
3 Replies

6. Shell Programming and Scripting

filesize

I want to know if there is any unix command to view the size of the file? eg. i have a directory letter in this i have file a,b,c,d,e. i just want to know the size of file d and not any other. (3 Replies)
Discussion started by: infyanurag
3 Replies

7. Shell Programming and Scripting

getting filesize

Hello, I have a script that should store file size in a variable $filesize. I don't know what is the best way to do it. I tried ls -lt myfile.txt | sed something >$filesize but I don't know how to use sed to get filesize. I know that the owner of the file is root and then we have some... (6 Replies)
Discussion started by: pppswing
6 Replies

8. Solaris

Check for filesize limit

How do I check for any file size limitations in a directories ? I remember my administrator had set a file limitation for a certain directory. I would like to know how I can check that. Thank you. (2 Replies)
Discussion started by: Leion
2 Replies

9. AIX

listing the whole system by filesize

Hi, Just wondered what command you would use to list all the files on Aix by filesize? I've tried a few but none of which seem to do the trick! Currently running du -m -a . | sort -rn | more as root Thanks, Matt. (1 Reply)
Discussion started by: elmesy
1 Replies

10. Shell Programming and Scripting

if condition for filesize

Hi, I want to check file size in unix, based on file size I am going to execute appropriate command. I tried below, but getting the error. System details – Machine hardware: sun4u OS version: 5.9 if ( -s $f1 ) then echo "filename exists and is > 0 bytes" else echo "filename... (7 Replies)
Discussion started by: rahulbahulekar
7 Replies
DPM-REGISTER(1) 					    DPM Administrator Commands						   DPM-REGISTER(1)

NAME
dpm-register - register external files in DPNS SYNOPSIS
dpm-register --filesize filesize [ --user owner_user ] [ --group owner_group ] [ --mode filemode ] --pfn pfn --server hostname [ --st sta- tus ] [ --help ] filename DESCRIPTION
dpm-register registers a given filename with the specified permissions into DPNS: - create the file metadata entry in DPNS (dpns_creat) - set the ownership (dpns_chown) to owner_user : owner_group (by default the requester's DN and group) - set the filemode (dpns_chmod) to filemode - set the size of the file (dpns_setfsize) to filesize - add the replica entry (dpns_addreplicax) setting * sfn = pfn * status to status ('O' for Online, 'N' for Nearline) * f_type = 'P' (Permanent) * r_type = 'P' (Primary) EXAMPLE
dpm-register --filesize 525424 --server `hostname --fqdn` --group biomed --pfn dicom:///1/2/3 /dpm/cern.ch/home/biomed/mdm/1/2/3 EXIT STATUS
This program returns 0 if the operation was successful or >0 if the operation failed. SEE ALSO
dpns_creat(3), dpns_chown(3), dpns_chmod(3), dpns_setfsize(3), dpns_addreplicax(3) LCG
$Date: 2008/01/07 10:38:38 $ DPM-REGISTER(1)
All times are GMT -4. The time now is 03:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy