Sponsored Content
Full Discussion: Filename & Owner
Top Forums Shell Programming and Scripting Filename & Owner Post 302456159 by funyotros on Thursday 23rd of September 2010 10:34:42 AM
Old 09-23-2010
Filename & Owner

Hi all!
I'm trying to write a script that joins the filename and the owner (e.g. .profile_root , home_smith)

Is there a easy way to do it. I've been trying with a for and playing with ls and head & tail. I would attach what I've had done but is very uglySmilie
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

changing owner & grp of a file

Hi, I have a file in my system as below My user and grp id is sns / sns -rwxrwxrwx 1 sns sns 6012357 Sep 27 06:01 sample Is there a way to change the owner and grp of this file to app / app ... ie. as given below -rwxrwxrwx 1 app app 6012357 Sep 27 06:01 sample I guessed... (1 Reply)
Discussion started by: Sabari Nath S
1 Replies

2. Solaris

Owner of file gets 'not owner' error for chgrp

Hi Folks, I know that changing users and groups is pretty basic admin, but this one has got me stumped. When I try to change the group of a file for which I am the owner for, it still gives me a 'Not owner' error. For example, when I am logged in as 'webadmin', I have the following file: ... (4 Replies)
Discussion started by: brizrobbo
4 Replies

3. Shell Programming and Scripting

Getting modified time & filename only

Hi, When we use "ls -l" we are getting like below, -rw-r--r-- 1 mdskl mds 4161479 Apr 12 14:57 VTTF2008.20080412145748.cc But i need only modified time and filename only like below, Apr 12 14:57 VTTF3008.20080412145748.cc Thanks-:) Senthil (4 Replies)
Discussion started by: senthil_seera
4 Replies

4. Shell Programming and Scripting

find and replace in subdirectory (filename & content - both)

Hi, I have to rename all occurance of CUST_MST to RESELLER_MST both in filename and file content under a directory (say D0) which contains multiple (2-3 levels) sub directory. Example: D0 -> D1 -> D2 has a file CUST_MST_TEMP.txt this contains : > cat /D0/D1/D2/CUST_MST_TEMP.txt... (3 Replies)
Discussion started by: sabyasm
3 Replies

5. UNIX for Dummies Questions & Answers

Adding Date & time stamps to filename

I need to edit the file name with date and time while writing the script. please help. (1 Reply)
Discussion started by: manish.s
1 Replies

6. UNIX for Advanced & Expert Users

How UNIX admin set up this? how files of 744 of other owner can be removed by another owner?

Hi all, We have some files are under 744 permissions and the the owner is say owner1 and group1. Now we have another user owner2 of group2, owner2 can remove files of the owner1 and the permission of those files are 744, unix admin told us he did some config at his side so we can do that. ... (14 Replies)
Discussion started by: TheGunMan
14 Replies

7. Shell Programming and Scripting

Korn Shell & Nawk...Filename changes

I have the following piece of code: YESTER=`TZ=aaa24 date +%b"-"%d` filelist2=$(find /export/home/gen/check/logs \( -name \*$YESTER\* ! -name \*ADM\* \) -print | tr '\n' ' ') nawk -F':' ' $2 ~ /Reason/ && $3 !~ /(PASSTHRU|OCAP|FP Power Button|Bootloader Reset)/ { split(FILENAME,... (2 Replies)
Discussion started by: ther2000
2 Replies

8. UNIX for Dummies Questions & Answers

AWK & FILENAME

My file looks something like this: infile.seq I need to include the filename in each identifier, without the extension, and number them with consecutive numbers starting with 1. So, the expected outfile should look like this: I have been trying to modify the following code but I... (5 Replies)
Discussion started by: Xterra
5 Replies

9. Solaris

Privileges : modify dir/file owner by other that's not owner

i need to do the following operations in solaris 10: 1.change owner and group owner for files which are not owned by the current user and user group 2.to can delete files in the /tmp directory which are not of the current user 3. allow to a standard user the deletion of files in the /tmp... (1 Reply)
Discussion started by: sirmark
1 Replies

10. Shell Programming and Scripting

[Beginner's questions] Filename Validation & Parsing

Hi !! I'm rather new both to the UNIX and scripting worlds, and I'm learning the ropes of scripting. Having said this, please excuse me if you notice certain basic errors. I'm working on a script that implements .jar and .war files for a WAS environment and I need to perform certain... (4 Replies)
Discussion started by: levaldez
4 Replies
gv(3python)															       gv(3python)

NAME
gv_python - graph manipulation in python SYNOPSIS
#!/usr/bin/python import gv USAGE
INTRODUCTION
gv_python is a dynamically loaded extension for python that provides access to the graph facilities of graphviz. COMMANDS
New graphs New empty graph graph_handle gv.graph (name); graph_handle gv.digraph (name); graph_handle gv.strictgraph (name); graph_handle gv.strictdigraph (name); New graph from a dot-syntax string or file graph_handle gv.readstring (string); graph_handle gv.read (string filename); graph_handle gv.read (channel); Add new subgraph to existing graph graph_handle gv.graph (graph_handle, name); New nodes Add new node to existing graph node_handle gv.node (graph_handle, name); New edges Add new edge between existing nodes edge_handle gv.edge (tail_node_handle, head_node_handle); Add a new edge between an existing tail node, and a named head node which will be induced in the graph if it doesn't already exist edge_handle gv.edge (tail_node_handle, head_name); Add a new edge between an existing head node, and a named tail node which will be induced in the graph if it doesn't already exist edge_handle gv.edge (tail_name, head_node_handle); Add a new edge between named tail and head nodes which will be induced in the graph if they don't already exist edge_handle gv.edge (graph_handle, tail_name, head_name); Setting attribute values Set value of named attribute of graph/node/edge - creating attribute if necessary string gv.setv (graph_handle, attr_name, attr_value); string gv.setv (node_handle, attr_name, attr_value); string gv.setv (edge_handle, attr_name, attr_value); Set value of existing attribute of graph/node/edge (using attribute handle) string gv.setv (graph_handle, attr_handle, attr_value); string gv.setv (node_handle, attr_handle, attr_value); string gv.setv (edge_handle, attr_handle, attr_value); Getting attribute values Get value of named attribute of graph/node/edge string gv.getv (graph_handle, attr_name); string gv.getv (node_handle, attr_name); string gv.getv (edge_handle, attr_name); Get value of attribute of graph/node/edge (using attribute handle) string gv.getv (graph_handle, attr_handle); string gv.getv (node_handle, attr_handle); string gv.getv (edge_handle, attr_handle); Obtain names from handles string gv.nameof (graph_handle); string gv.nameof (node_handle); string gv.nameof (attr_handle); Find handles from names graph_handle gv.findsubg (graph_handle, name); node_handle gv.findnode (graph_handle, name); edge_handle gv.findedge (tail_node_handle, head_node_handle); attribute_handle gv.findattr (graph_handle, name); attribute_handle gv.findattr (node_handle, name); attribute_handle gv.findattr (edge_handle, name); Misc graph navigators returning handles node_handle gv.headof (edge_handle); node_handle gv.tailof (edge_handle); graph_handle gv.graphof (graph_handle); graph_handle gv.graphof (edge_handle); graph_handle gv.graphof (node_handle); graph_handle gv.rootof (graph_handle); Obtain handles of proto node/edge for setting default attribute values node_handle gv.protonode (graph_handle); edge_handle gv.protoedge (graph_handle); Iterators Iteration termination tests bool gv.ok (graph_handle); bool gv.ok (node_handle); bool gv.ok (edge_handle); bool gv.ok (attr_handle); Iterate over subgraphs of a graph graph_handle gv.firstsubg (graph_handle); graph_handle gv.nextsubg (graph_handle, subgraph_handle); Iterate over supergraphs of a graph (obscure and rarely useful) graph_handle gv.firstsupg (graph_handle); graph_handle gv.nextsupg (graph_handle, subgraph_handle); Iterate over edges of a graph edge_handle gv.firstedge (graph_handle); edge_handle gv.nextedge (graph_handle, edge_handle); Iterate over outedges of a graph edge_handle gv.firstout (graph_handle); edge_handle gv.nextout (graph_handle, edge_handle); Iterate over edges of a node edge_handle gv.firstedge (node_handle); edge_handle gv.nextedge (node_handle, edge_handle); Iterate over out-edges of a node edge_handle gv.firstout (node_handle); edge_handle gv.nextout (node_handle, edge_handle); Iterate over head nodes reachable from out-edges of a node node_handle gv.firsthead (node_handle); node_handle gv.nexthead (node_handle, head_node_handle); Iterate over in-edges of a graph edge_handle gv.firstin (graph_handle); edge_handle gv.nextin (node_handle, edge_handle); Iterate over in-edges of a node edge_handle gv.firstin (node_handle); edge_handle gv.nextin (graph_handle, edge_handle); Iterate over tail nodes reachable from in-edges of a node node_handle gv.firsttail (node_handle); node_handle gv.nexttail (node_handle, tail_node_handle); Iterate over nodes of a graph node_handle gv.firstnode (graph_handle); node_handle gv.nextnode (graph_handle, node_handle); Iterate over nodes of an edge node_handle gv.firstnode (edge_handle); node_handle gv.nextnode (edge_handle, node_handle); Iterate over attributes of a graph attribute_handle gv.firstattr (graph_handle); attribute_handle gv.nextattr (graph_handle, attr_handle); Iterate over attributes of an edge attribute_handle gv.firstattr (edge_handle); attribute_handle gv.nextattr (edge_handle, attr_handle); Iterate over attributes of a node attribute_handle gv.firstattr (node_handle); attribute_handle gv.nextattr (node_handle, attr_handle); Remove graph objects bool gv.rm (graph_handle); bool gv.rm (node_handle); bool gv.rm (edge_handle); Layout Annotate a graph with layout attributes and values using a specific layout engine bool gv.layout (graph_handle, string engine); Render Render a layout into attributes of the graph bool gv.render (graph_handle); Render a layout to stdout bool gv.render (graph_handle, string format); Render to an open file bool gv.render (graph_handle, string format, channel fout); Render a layout to an unopened file by name bool gv.render (graph_handle, string format, string filename); Render to an open channel bool gv.renderchannel (graph_handle, string format, string channelname); Render to a string result gv.renderresult (graph_handle, string format, string outdata); Render a layout to a malloc'ed string, to be free'd by the caller (deprecated - too easy to leak memory) (still needed for "eval [gv::renderdata $G tk]" ) string gv.renderdata (graph_handle, string format); Writing graph back to file bool gv.write (graph_handle, string filename); bool gv.write (graph_handle, channel); KEYWORDS
graph, dot, neato, fdp, circo, twopi, python. 11 January 2014 gv(3python)
All times are GMT -4. The time now is 04:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy