06-27-2008
Deleting contents of a UNIX File
Hi ALL,
Can anyone help me out.
I have unix file, I need to delete the contents of the file. Can any one let me know the command to do this.
The file has to be there, but the contents should be deleted.
thanks
Manas
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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
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 (2 Replies)
Discussion started by: megh
2 Replies
4. Shell Programming and Scripting
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
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
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
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
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
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
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
LEARN ABOUT DEBIAN
grid-mapfile-delete-entry
GRID-MAPFILE-DELET(8) Globus Commands GRID-MAPFILE-DELET(8)
NAME
grid-mapfile-delete-entry - Remove entries from a gridmap file
SYNOPSIS
grid-mapfile-delete-entry [-help] [-usage] [-version] [-versions]
grid-mapfile-delete-entry {-dn DISTINGUISHED-NAME} {-ln LOCAL-NAME...}
[[-d] | [-dryrun]]
[[-mapfile MAPFILE] | [-f MAPFILE]]
DESCRIPTION
The grid-mapfile-delete-entry program deletes mappings from a gridmap file. If both the -dn and -ln> options are specified,
grid-mapfile-delete-entry removes entries which meet both criteria (remove entries mapping DISTINGUISHED-NAME to LOCAL-NAME for each
LOCAL-NAME specified). If only -dn or -ln is specified all entries for that DISTINGUISHED-NAME or LOCAL-NAME are removed.
By default, grid-mapfile-delete-entry will modify the gridmap file named by the GRIDMAP environment variable if present, or the file
/etc/grid-security/grid-mapfile if not. This can be changed by the use of the -mapfile or -f command-line options.
Prior to modifying a gridmap file, grid-mapfile-delete-entry saves its current contents to a file with the string .old appended to the
original file name.
The full set of command-line options to grid-mapfile-delete-entry are:
-help, -usage
Display the command-line options to grid-mapfile-delete-entry.
-version, -versions
Display the version number of the grid-mapfile-delete-entry command. The second form includes more details.
-dn DISTINGUISHED-NAME
The X.509 distinguished name to remove from the gridmap file. If the -ln option is not specified, remove all entries for this name;
otherwise, remove entries that match both this name and the local name. The name should be in OpenSSL's oneline format.
-ln LOCAL-NAME...
The POSIX user name to remove from the gridmap file. Include multiple LOCAL-NAME strings after the -ln command-line option to remove
multiple names from the gridmap. If the -dn option is not specifeid, remove all entries for these names; otherwise, remove entries that
match the DISTINGUISHED-NAME and any of the LOCAL-NAME values.
-d, -dryrun
Display diagnostics about what would be removed from the gridmap file, but don't actually modify the file.
-mapfile MAPFILE, -f MAPFILE
Modify the gridmap file named by MAPFILE instead of the default.
EXAMPLES
Remove all mappings for a distinguished name:
% grid-mapfile-delete-entry "/DC=org/DC=example/DC=grid/CN=Joe User"
Modifying /etc/grid-security/grid-mapfile ...
Deleting entry: "/DC=org/DC=example/DC=grid/CN=Joe User" juser,juser2
(1) entry deleted
Remove the mapping between a distinguished name and a single local username:
% grid-mapfile-delete-entry "/DC=org/DC=example/DC=grid/CN=Joe User" -ln juser2
Modifying /etc/grid-security/grid-mapfile ...
Current entry: "/DC=org/DC=example/DC=grid/CN=Joe User" juser
(1) mapping removed: (juser2), (0) not present and ignored
(0) entries deleted
ENVIRONMENT VARIABLES
The following environment variables affect the execution of grid-mapfile-delete-entry:
GRIDMAP
Path to the default gridmap to modify.
FILES
The following files affect the execution of grid-mapfile-delete-entry:
/etc/grid-security/grid-mapfile
Path to the default gridmap to modify if GRIDMAP environment variable is not set.
SEE ALSO
grid-mapfile-add-entry(8), grid-mapfile-check-consistency(8)
AUTHOR
University of Chicago
Globus Toolkit 5.0.1 03/19/2010 GRID-MAPFILE-DELET(8)