In the following command:
how is the recursion list built for the actual rm ?
F'rinstance; I had a case where a user typed this as root using '/' instead of '.' so everything in the root level was going to be traversed. They hit <ctrl>C before too much was deleted but this leaves me with the task of figuring out what was deleted. The only files I am positive that were removed were from /opt and I haven't found anything missing from /bin
So, how does the kernel decide what directories get hit first since it doesn't appear to be alphabetical?
I'm using the UNIX csh and i wish to use recursion to nav my way up (or down as it is) a given folder.
My little test script is called "r" and takes a folder as argv (or $1)
#!/bin/tcsh -f
set allFiles = `ls -A $argv`
cd $argv
while ($#allFiles)
if (-d... (1 Reply)
Hello,
I create a file touch 1201093003 fichcomp
and inside a repertory (which hava a lot of files) I want to list all files created before this file :
find *.* \! -maxdepth 1 - newer fichcomp but this command returned bash: /usr/bin/find: Argument list too long
but i make a filter all... (1 Reply)
I am running a korn shell script which has a recursive function.
The script ran for 117 iterations and ended up with the following error
"recursion too deep".
what should be done to avert this?
Thanks in advance
Swamy
p.s. I am on UNIX MPRAS V4 (3 Replies)
Hello every body. I am trying to find the factorial using the following code. But it is giving the syntax error. I tried very much but in vain. Thanks in advance for helping me
factorial()
{
if
then
y=`expr $1 - 1`
x=$(( $1 \* factorial $y ))... (6 Replies)
Hi,
If i have given to write a prog for factorial in C using recursion and without
recursion which one is better in what condition and why ?
thanks (2 Replies)
I want to halt a tail recursive function after certain validation. I want to come out of entire recursion without unwinding phase. How can i achieve that . The coding is done in C language. (5 Replies)
I will be very grateful if someone can help me with bash shell script that does the following:
I have a list of filenames:
A01_155716
A05_155780
A07_155812
A09_155844
A11_155876
that are kept in different sub directories within my current directory. I want to find these files and copy... (3 Replies)
Hi,
Question: how come the output is like that? Can explain to me abit. I am learning C.
Thanks!
#include <stdio.h>
#include <string.h>
void printit(char line_of_char, int index);
int main()
{
char line_of_char;
int index = -1;
strcpy(line_of_char, "This is a string.");
... (5 Replies)
Can someone please explain me why the following script calls it self recursively:
#!/bin/bash
echo Called
$0
while this not:
#!/bin/bash
echo Called
$($0)
Thanks (6 Replies)
I need to find a word '% Retail by State' in the folder /usr/sas/reports/RetailSalesTaxallocation.
When I tried like below,
-bash-4.1$ cd /usr/sas/reports/RetailSalesTaxallocation
-bash-4.1$ find ./ -name % Retail by State
find: paths must precede expression: Retail
Usage: find ... (10 Replies)
Discussion started by: Ram Kumar_BE
10 Replies
LEARN ABOUT DEBIAN
blt_treedeletenode
Blt_TreeDeleteNode(3) BLT Library Procedures Blt_TreeDeleteNode(3)__________________________________________________________________________________________________________________________________________________NAME
Blt_TreeDeleteNode - Deletes a node and its descendants.
SYNOPSIS
#include <bltTree.h>
Blt_TreeNode
Blt_TreeDeleteNode(tree, node)
ARGUMENTS
Blt_Tree tree (in) Tree containing the node.
Blt_TreeNode node (in) Node to be deleted.
_________________________________________________________________DESCRIPTION
This procedure deletes a given node and all it descendants from a tree data object.
The arguments are as follows:
tree The tree containing the parent node.
node Node to be deleted. The node and its descendant nodes are deleted. Each node's data values are deleted also. The reference
count of the Tcl_Obj is decremented.
Since all tree objects must contain at least a root node, the root node itself can't be deleted unless the tree is released and destroyed.
Therefore you can clear a tree by deleting its root, but the root node will remain until the tree is destroyed.
RETURNS
Always returns TCL_OK. Errors generated in a notification callbacks are backgrounded (see Tcl_TreeCreateNotifyHandler).
EXAMPLE
The following example deletes the root node.
Blt_TreeNode root;
root = Blt_TreeRootNode(token);
Blt_TreeDeleteNode(token, root);
NOTIFICATIONS
Blt_TreeDeleteNode can trigger tree notify events. You can be notified whenever a node is deleted by using the Blt_TreeCreateNotifyHan-
dler. A callback routine is registered that will be automatically invoked whenever a node is deleted via Blt_TreeDeleteNode to the tree.
KEYWORDS
tree, token
BLT 2.4 Blt_TreeDeleteNode(3)