Sponsored Content
Full Discussion: 'total 0' in ls output
Top Forums UNIX for Advanced & Expert Users 'total 0' in ls output Post 302879965 by solaris_1977 on Monday 16th of December 2013 05:44:28 PM
Old 12-16-2013
This server is a linux virtual server and /dev/simfs is a NAS device, which is mounted as /export on this virtual server.
Code:
(tty/dev/pts/27): bash: 904 > df -h .
Filesystem            Size  Used Avail Use% Mounted on
/dev/simfs            4.9T  983G  3.9T  20% /export
tlifsp13: /export/home/pams/to-klvsp-12162013
(tty/dev/pts/27): bash: 904 > ls -l
total 0          -------> on NAS drive, same data shows zero
-rw------- 1 pams klvsp 3789 Dec 16 11:44 SA89766.TXT
-rw------- 1 pams klvsp 4124 Dec 16 11:44 SA89779.TXT
-rw------- 1 pams klvsp 4106 Dec 16 11:44 SA89785.TXT
-rw------- 1 pams klvsp 4010 Dec 16 11:49 SA89796.TXT
tlifsp13: /export/home/pams/to-klvsp-12162013
(tty/dev/pts/27): bash: 905 > mkdir /var/tmp/test_dir
tlifsp13: /export/home/pams/to-klvsp-12162013
(tty/dev/pts/27): bash: 906 > cp -p * /var/tmp/test_dir/
tlifsp13: /export/home/pams/to-klvsp-12162013
(tty/dev/pts/27): bash: 907 > ls -l /var/tmp/test_dir
total 24              -------> on local drive, same data shows some value
-rw------- 1 pams klvsp 3789 Dec 16 11:44 SA89766.TXT
-rw------- 1 pams klvsp 4124 Dec 16 11:44 SA89779.TXT
-rw------- 1 pams klvsp 4106 Dec 16 11:44 SA89785.TXT
-rw------- 1 pams klvsp 4010 Dec 16 11:49 SA89796.TXT
tlifsp13: /export/home/pams/to-klvsp-12162013
(tty/dev/pts/27): bash: 908 >

There is a script setup in cronjob developed by application team and it says, if total = 0 then do not proceed, if total = more than 1, that file should be sent to some ftp site. Script is not a problem for me, but I was concerned only for that total value. NAS is properly mounted and lot of other users are able to read/write on it, but is there anything else that can be changed from OS side ? I am getting in touch with Storage team also to understand its behavior.
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

grep running total/ final total across multiple files

Ok, another fun hiccup in my UNIX learning curve. I am trying to count the number of occurrences of an IP address across multiple files named example.hits. I can extract the number of occurrences from the files individually but when you use grep -c with multiple files you get the output similar to... (5 Replies)
Discussion started by: MrAd
5 Replies

2. UNIX for Dummies Questions & Answers

du total

Hi All Can anyone help me with the following du querry. I am trying to achieve a total size for all the zipped files in a directory. Using du -k *.gz gets me a file by file list but no handy total at the bottom. Thanks Ed (9 Replies)
Discussion started by: C3000
9 Replies

3. Shell Programming and Scripting

total output from a file created in a while loop

I have a while loop which looks for files and then sets a variable to give me the record count of each file: current_members=`wc -l ${DATA_DIR}/$MEMBERS_FILENAME | nawk '{ printf "%d\n", $0}'` I am out putting the totals into a file: echo $current_members >> ../data/out_total_members.dat ... (7 Replies)
Discussion started by: Pablo_beezo
7 Replies

4. Shell Programming and Scripting

Calculate total space, total used space and total free space in filesystem names matching keyword

Good afternoon! Im new at scripting and Im trying to write a script to calculate total space, total used space and total free space in filesystem names matching a keyword (in this one we will use keyword virginia). Please dont be mean or harsh, like I said Im new and trying my best. Scripting... (4 Replies)
Discussion started by: bigben1220
4 Replies

5. Shell Programming and Scripting

Output no. of rows and total value of a file to a new file

I am relatively new to Unix and I would be grateful if someone could help me with the syntax of a script. I am trying to write a Unix script against the file ‘ajtest.dat’ (see below) so that it outputs the number of rows and total value of column 3 in a file called ‘aj1’ as follows: No. of... (11 Replies)
Discussion started by: ajmutley
11 Replies

6. UNIX for Dummies Questions & Answers

Explanation of "total" field in "ls -l" command output

When I do a listing in one particular directory (ls -al) I get: total 43456 drwxrwxrwx 2 root root 4096 drwxrwxrwx 3 root root 4096 -rwxrwxr-x 1 nobody nobody 3701594 -rwxrwxr-x 1 nobody nobody 3108510 -rwxrwxr-x 1 nobody nobody 3070580 -rwxrwxr-x 1 nobody nobody 3099733 -rwxrwxr-x 1... (1 Reply)
Discussion started by: proactiveaditya
1 Replies

7. Solaris

What does total mean in ls -l output?

# ls -l | more total 12861 drwxr-xr-x 3 root root 512 Jun 20 21:57 Desktop drwxr-xr-x 2 root root 512 Oct 16 2010 Documents lrwxrwxrwx 1 root root 9 Oct 16 2010 bin -> ./usr/bin drwxr-xr-x 7 root sys 512 Oct 16 2010 boot drwxr-xr-x... (2 Replies)
Discussion started by: chidori
2 Replies

8. Shell Programming and Scripting

Help with sum total number of record and total number of record problem asking

Input file SFSQW 5192.56 HNRNPK 611.486 QEQW 1202.15 ASDR 568.627 QWET 6382.11 SFSQW 4386.3 HNRNPK 100 SFSQW 500 Desired output file SFSQW 10078.86 3 QWET 6382.11 1 QEQW 1202.15 1 HNRNPK 711.49 2 ASDR 568.63 1 The way I tried: (2 Replies)
Discussion started by: patrick87
2 Replies

9. Solaris

Total

i want to list Total HDD count in any soalris machine..can someone suggest some commands or combinations of commands (6 Replies)
Discussion started by: omkar.jadhav
6 Replies
usb-devices(8)							Linux USB Utilities						    usb-devices(8)

NAME
usb-devices - print USB device details SYNOPSIS
usb-devices DESCRIPTION
usb-devices is a (bash) shell script that can be used to display details of USB buses in the system and the devices connected to them. The output of the script is similar to the usb/devices file available either under /proc/bus (if usbfs is mounted), or under /sys/ker- nel/debug (if debugfs is mounted there). The script is primairily intended to be used if the file is not available. In contrast to the usb/devices file, this script only lists active interfaces (those marked with a "*" in the usb/devices file) and their endpoints. Be advised that there can be differences in the way information is sorted, as well as in the format of the output. RETURN VALUE
If sysfs is not mounted, a non-zero exit code is returned. FILES
/sys/bus/usb/devices/usb* The part of the sysfs tree the script walks through to assemble the printed information. /proc/bus/usb/devices Location where the usb/devices file can normally be found for Linux kernels before 2.6.31, if usbfs is mounted. /sys/kernel/debug/usb/devices Location where the usb/devices file can normally be found for Linux kernel 2.6.31 and later, if debugfs is mounted. SEE ALSO
lsusb(8), usbview(8). AUTHORS
Greg Kroah-Hartman <greg@kroah.com> Randy Dunlap <rdunlap@xenotime.net> Frans Pop <elendil@planet.nl> usbutils-0.84 23 June 2009 usb-devices(8)
All times are GMT -4. The time now is 07:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy