12-23-2010
Is it giving any error? Did you check the exit status of command after it is completed (echo $?)
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello all
I wander if I make for example " ls -l "
And it gives me all the files in the directory with the additional info like data size and privileges
But what if I like to filter the stout result for example by date
When I try to do:
echo "`ls -l`" | grep "Jan 12"
it gives me the... (2 Replies)
Discussion started by: umen
2 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I'm newbie to Unix. I'd like to count the total size of those files in my directory by date. For example, files on this period 05/01/08 - 05/31/08. If possible can we count by byte instead of kb.
if I use $ du - ks , it will add up all files in the dir.
thanks,
Helen (5 Replies)
Discussion started by: helen008
5 Replies
3. UNIX for Dummies Questions & Answers
Hi guys.
I am trying, to move files found with the find command...
Script runs fine, until it reaches a file that contains spaces...
Here is what i wrote up quickly.
ROOTDIR=/apps/data
SEARCH=$(find /data/HDTMPRestore/home/tmq/ -type f -print | grep Mods/Input/bck | cut -c19-)
for i... (1 Reply)
Discussion started by: Stephan
1 Replies
4. UNIX for Dummies Questions & Answers
im a beginner in shell scripting and i need a script which will find a file in a given path without the use of find or grep command.......i need some kind of code.....plzzz plzzzz help me......ive tried n searched every where but i couldn't find the solution for my particular problem..... (4 Replies)
Discussion started by: mishi
4 Replies
5. Shell Programming and Scripting
Hi
I need to find and delete 0-4 bytes size files in a folder.
How can I achieve that? (1 Reply)
Discussion started by: kapilk
1 Replies
6. HP-UX
Hi,
I want to find the size of the files added to a folder after a certain date(say 1st of october), I know we can list the files which were created after a certain date , but is there anyway to find the total size of those files ? (3 Replies)
Discussion started by: alookachaloo
3 Replies
7. Shell Programming and Scripting
Hi,
Could anyone help me to solve this problem?
I have two files "f1" and "f2" having 2 fields in each, a) file size and b) file name. The data are almost same in both the files except for few and new additional lines. Now, I have to find out and print the output as, the difference in the... (3 Replies)
Discussion started by: royalibrahim
3 Replies
8. Shell Programming and Scripting
Hi!
I want to find duplicate files (criteria: file size) in my download folder.
I try it like this:
find /Users/frodo/Downloads \! -type d -exec du {} \; | sort > /Users/frodo/Desktop/duplicates_1.txt;
cut -f 1 /Users/frodo/Desktop/duplicates_1.txt | uniq -d | grep -hif -... (9 Replies)
Discussion started by: Dirk Einecke
9 Replies
9. Solaris
If I have a number of files in a directory, for example,
test.1
test.2
test.3
abc.1
abc.2
abc.3
and I need to find the total file size of all of the test.* files, I can use du -bc test.* in Linux.
However, in Solaris, du does not have the -c option. What can I do in Solaris to get... (11 Replies)
Discussion started by: learnix
11 Replies
10. Shell Programming and Scripting
Hi,
How would you write bash script that given a directory as an argument and finds all duplicate files (with same contents - by using bytewise comparison) there and prints their names? (6 Replies)
Discussion started by: elior
6 Replies
LEARN ABOUT CENTOS
scsi_status
scsi_status(9S) Data Structures for Drivers scsi_status(9S)
NAME
scsi_status - SCSI status structure
SYNOPSIS
#include <sys/scsi/scsi.h>
INTERFACE LEVEL
Solaris DDI specific (Solaris DDI)
DESCRIPTION
The SCSI-2standard defines a status byte that is normally sent by the target to the initiator during the status phase at the completion of
each command.
STRUCTURE MEMBERS
uchar sts_scsi2 :1; /* SCSI-2 modifier bit */
uchar sts_is :1; /* intermediate status sent */
uchar sts_busy :1; /* device busy or reserved */
uchar sts_cm :1; /* condition met */
ucha sts_chk :1; /* check condition */
sts_chk indicates that a contingent allegiance condition has occurred.
sts_cm is returned whenever the requested operation is satisfied
sts_busy indicates that the target is busy. This status is returned whenever a target is unable to accept a command from an otherwise
acceptable initiator (that is, no reservation conflicts). The recommended initiator recovery action is to issue the command again later.
sts_is is returned for every successfully completed command in a series of linked commands (except the last command), unless the command is
terminated with a check condition status, reservation conflict, or command terminated status. Note that host bus adapter drivers may not
support linked commands (see scsi_ifsetcap(9F)). If sts_is and sts_busy are both set, then a reservation conflict has occurred.
sts_scsi2 is the SCSI-2 modifier bit. If sts_scsi2 and sts_chk are both set, this indicates a command terminated status. If sts_scsi2 and
sts_busy are both set, this indicates that the command queue in the target is full.
For accessing the status as a byte, the following values are appropriate:
STATUS_GOOD This status indicates that the target has successfully completed the command.
STATUS_CHECK This status indicates that a contingent allegiance condition has occurred.
STATUS_MET This status is returned when the requested operations are satisfied.
STATUS_BUSY This status indicates that the target is busy.
STATUS_INTERMEDIATE This status is returned for every successfully completed command in a series of linked commands.
STATUS_SCSI2 This is the SCSI-2 modifier bit.
STATUS_INTERMEDIATE_MET This status is a combination of STATUS_MET and STATUS_INTERMEDIATE.
STATUS_RESERVATION_CONFLICT This status is a combination of STATUS_INTERMEDIATE and STATUS_BUSY, and it is returned whenever an initia-
tor attempts to access a logical unit or an extent within a logical unit is reserved.
STATUS_TERMINATED This status is a combination of STATUS_SCSI2 and STATUS_CHECK, and it is returned whenever the target ter-
minates the current I/O process after receiving a terminate I/O process message.
STATUS_QFULL This status is a combination of STATUS_SCSI2 and STATUS_BUSY, and it is returned when the command queue in
the target is full.
SEE ALSO
scsi_ifgetcap(9F), scsi_init_pkt(9F), scsi_extended_sense(9S), scsi_pkt(9S)
Writing Device Drivers
SunOS 5.10 30 Aug 1995 scsi_status(9S)