Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Deleting contents of a UNIX File Post 302209466 by encrypted on Friday 27th of June 2008 04:10:06 AM
Old 06-27-2008
> filename

Will delete the contents of the file
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Remove the contents of a file without deleting the file

Hi All, I want to delete the contents of few files which are really huge in size. How the same can be done by using sed. Is there any other alternative to sed. Thanks in advance (10 Replies)
Discussion started by: sumesh.abraham
10 Replies

2. Shell Programming and Scripting

Query:just need to remove the contents of the file without deleting that

Hii, Please suggest me how can i only remove the contents of the file without deleting it. (3 Replies)
Discussion started by: namishtiwari
3 Replies

3. HP-UX

how to redirect the growing contents of log file to another file in unix

how to redirect the growing contents of log file to another file in unix (2 Replies)
Discussion started by: megh
2 Replies

4. Shell Programming and Scripting

Deleting the contents of a folder older than X hours

Every day a new .zip file is uploaded to a folder and at mid-night the zip file is to be extracted into a /data/ folder, inside a date-named folder. # This should extract the contents of a zip file into the /data/ folder into a date based folder /usr/bin/unzip -a -o... (15 Replies)
Discussion started by: worchyld
15 Replies

5. UNIX for Dummies Questions & Answers

Script For Deleting Contents of "Live" Log File

In our shop, we have a situation where a log file from our interface engine software has begun maxing out in file size (reaching the 32-bit "2147483647" limit). Currently, the only way to rectify this is to stop the interface and restart it, which generates a new log. Easy enough, but the... (6 Replies)
Discussion started by: rjhjr64
6 Replies

6. UNIX for Dummies Questions & Answers

How to add/sum same contents in a unix file

Input 1 2N 2N 1 2N 2N 1 2N 2N 1 2N Ateus 1 3 Mobiles 3M-100 1 3 Mobiles 3M-100 1 3 Mobiles 3M-100 1 3GNET 3gnet 1 3GNET 3gnet 1 3GNET G2828 1 3GNET G2828 1 3GNET G2829 1 3GNET G2829 1 3GNET G2829 OutPut should be 3 2N 2N 3 3 Mobiles 3M-100 2 3GNET 3gnet (4 Replies)
Discussion started by: gagan2010
4 Replies

7. Shell Programming and Scripting

How to clear contents of a file without deleting it.

Hi, I have a script which will use an input.txt file as an input file. I am providing data to this input file in the script and once the script is executed, I want to clear all the contents of this file as during the second time use of this script, I'll be appending the data in this input... (5 Replies)
Discussion started by: pat_pramod
5 Replies

8. UNIX for Dummies Questions & Answers

Write terminal contents into a one file in UNIX

Hi guys, How to write terminal contents into a file in Unix operating system Actually I created GUI by using Gtk2-perl. I want to display data on GUI whatever the contents writing on terminal. So which command I have to use and where that command to be run I mean in shell script or Perl... (2 Replies)
Discussion started by: kiran425
2 Replies

9. UNIX for Dummies Questions & Answers

What option will use for deleting directory with all its contents?

Hi How to completely delete directory with all it contents I try to use rmdir -r but it give error Thanks ---------- Post updated at 03:10 AM ---------- Previous update was at 02:52 AM ---------- Hi all I got the solution for my thread i use mkdir with the option -p Thanks (1 Reply)
Discussion started by: Tauatioti
1 Replies

10. UNIX for Beginners Questions & Answers

UNIX utility to find difference in folder, file and contents of file against a base version

Hi, I am trying to find out whether there are any Unix utilities that compares folders, files and contents within the file and provides a comprehensive report. The comparison can be against base version of a folder and file with content. Can you please let me know of such a utility? Thanks,... (6 Replies)
Discussion started by: Sripathi_ks
6 Replies
stripe(8)						      System Manager's Manual							 stripe(8)

NAME
stripe - Stripes a file across several volumes in a file domain SYNOPSIS
/usr/sbin/stripe -n volume_count filename OPTIONS
Specifies the number of volumes the striped file crosses. The number of volumes must be greater than one. OPERANDS
Specifies the name of the file to stripe. DESCRIPTION
The stripe utility enables you to improve the read/write performance of a file. The stripe utility directs a zero-length file (a file with no data written to it yet) to be spread evenly across several volumes within a file domain. As data is appended to the file, the data is spread across the volumes. AdvFS determines the number of pages per stripe segment and alternates the segments among the disks in a sequen- tial pattern. Existing, nonzero-length files cannot be striped using the stripe utility. To stripe an existing file, create a new file, use the stripe utility to stripe the new file, and copy the contents of the file you want to stripe into the new striped file. After copying the file, delete the nonstriped file. Once a file is striped, you cannot use the stripe utility to modify the number of disks that a striped file crosses. To change the volume count of a striped file, you can create a second file with a new volume count, and then copy the contents of the first file into the second file. After copying the file, delete the first file. RESTRICTIONS
You cannot stripe a nonzero-length file or a file that is already striped. EXAMPLES
The following example stripes the file abc across three volumes in the same file domain: # stripe -n 3 abc The following example stripes an existing, nonzero-length file, foo, across three volumes in the same domain. First a new file, newfoo, is created and striped. Then, the contents of file foo are copied to the new, striped file: # touch newfoo # stripe -n 3 newfoo # cp foo newfoo SEE ALSO
advfs(4), showfile(8) stripe(8)
All times are GMT -4. The time now is 02:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy