Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Command to stop sub directories being counted? Post 302589596 by jayan_jay on Thursday 12th of January 2012 07:04:02 AM
Old 01-12-2012
Below code wont consider the current directory into count ..
Code:
$ ls -ld */ | wc -l

But still need to subtract one from the result, follow the below one ..
Code:
$ echo "$(ls -ld */ | wc -l) - 1" | bc


Last edited by jayan_jay; 01-12-2012 at 08:09 AM..
 

10 More Discussions You Might Find Interesting

1. Post Here to Contact Site Administrators and Moderators

Number of posts counted wrong

I am not sure if this is the right place to post this. Heres my problem: When I posted yesterday I think I saw the number of posts made by me as above 60. Today morning when I posted, it showed my post as the 60th post. What went wrong? (In fact I referred to a previous post made me...it shows up... (1 Reply)
Discussion started by: Abhishek Ghose
1 Replies

2. Programming

Stop exe from command line

Hi All, I want to find if a certain exe is running and if it is running i want to stop the execution of this exe (the exe has been created by me) on solaris. What are the unix command i need to use and can i put these comand in a shell script or create a new exe to do this task (i would... (4 Replies)
Discussion started by: zing
4 Replies

3. Shell Programming and Scripting

How to stop Sqlplus command from printing db connection details

Hi, Could someone tell me how to stop SQLPLUS command from printing the connection details in the console. Below is the lines i get in console when executing the sqlplus... SQL*Plus: Release 10.2.0.1.0 - Production on Wed Mar 9 03:31:03 2011 Copyright (c) 1982, 2005, Oracle. All rights... (2 Replies)
Discussion started by: funonnet
2 Replies

4. Shell Programming and Scripting

Need to stop script for until present command excuted

Hi, Basically I am running a script in another script. #!/bin/sh DIRECTORY="/export/home/scripts" CURDATIME=`date '+%m%d%y_%H%M%S'` LOG_FILE="${DIRECTORY}/${CURDATIME}_abc.out" echo "ABC Delta Script started at `${CURDATIME}`" > $LOG_FILE cd ${DIRECTORY} sh ./abcDeltaRun.sh >>... (1 Reply)
Discussion started by: tnrchinna
1 Replies

5. UNIX for Dummies Questions & Answers

Using grep command to find the pattern of text in all directories and sub-directories.

Hi all, Using grep command, i want to find the pattern of text in all directories and sub-directories. e.g: if i want to search for a pattern named "parmeter", i used the command grep -i "param" ../* is this correct? (1 Reply)
Discussion started by: vinothrajan55
1 Replies

6. Shell Programming and Scripting

Command to stop all the cron jobs

Hi All, Please provide the command to stop all the cron jobs. Thanks in Advance Regards, Sindu (2 Replies)
Discussion started by: indira_s
2 Replies

7. Red Hat

perf provides <not counted> for multiple fields

Hi, I am trying to find the number of cache misses that are caused by my code. The best way I could find was to use the perf command. After running command: perf stat dd if=/dev/zero of=/dev/null count=100, the output I got is: 1.812057 task-clock-msecs # 0.876 CPUs ... (0 Replies)
Discussion started by: fidelity
0 Replies

8. Shell Programming and Scripting

Read command stop on either EOF or a specific line

I'm trying to stop reading a file until the end of the file is reached or a defined delimiter line is reached. Some how I need to test the fail state of the last 2 commands, not just the last command. echo -e "hello\ngoodbye\n####\ntesting" | while read line; ]; do echo "$line"; done hello... (4 Replies)
Discussion started by: Michael Stora
4 Replies

9. Red Hat

Logged in users on a Linux server are counted twice

Scenario: 1. Log into a linux server interface as root. 2. Inititiate an SSH session with the server using Putty and a valid user account (e.g. fakeuser). 3. Log into TTY2 of the linux server interface using another valid user account (e.g. faketester). Issue: With these three login... (1 Reply)
Discussion started by: walterthered
1 Replies

10. Linux

Logged in users on a Linux server are counted twice

Scenario: Log into a linux server interface as root. Inititiate an SSH session with the server using Putty and a valid user account (e.g. fakeuser). Log into TTY2 of the linux server interface using another valid user account (e.g. faketester). Issue: With these three login sessions,... (8 Replies)
Discussion started by: walterthered
8 Replies
bedup(8)							       bedup								  bedup(8)

NAME
bedup - program for deduplication program with additional knowledge of burp SYNOPSIS
bedup [options] A file deduplication program with additional knowledge of burp storage directories. This program comes with the burp backup and restore package. OPTIONS
-c path Path to config file (default: /etc/burp/burp.conf). -g <list of group names> Only run on the directories of clients that are in one of the groups specified. The list is comma-separated. To put a client in a group, use the 'dedup_group' option in the client configuration file on the server. -h|-? Print help text and exit. -l Hard link any duplicate files found. -m <number> Maximum number of hard links to a single file. (non-burp mode only - in burp mode, use the max_hardlinks option in the configuration file) The default is 10000. On ext3, the maximum number of links possible is 32000, but space is needed for the normal operation of burp. -n <list of directories> Non-burp mode. Deduplicate any (set of) directories. -v Print version and exit. By default, bedup will read /etc/burp/burp.conf and deduplicate client storage directories using special knowledge of the structure. With '-n', this knowledge is turned off and you have to specify the directories to deduplicate on the command line. Running with '-n' is therefore dangerous if you are deduplicating burp storage directories. BUGS
If you find bugs, please report them to the email list. See the website <http://burp.grke.net/> for details. AUTHOR
The main author of Burp is Graham Keeling. COPYRIGHT
See the LICENCE file included with the source distribution. February 10, 2012 bedup(8)
All times are GMT -4. The time now is 01:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy