Sponsored Content
Full Discussion: Equivalent command to 'stat'
Top Forums Shell Programming and Scripting Equivalent command to 'stat' Post 302153892 by ghostdog74 on Thursday 27th of December 2007 05:28:16 AM
Old 12-27-2007
here you go
Code:
# du -b file |cut -f1

or
Code:
# ls -l file| awk '{print $5}'

or
Code:
# wc -c file | cut -f1


Last edited by ghostdog74; 12-27-2007 at 06:34 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

stat command

how can ý use "stat command"????.. (2 Replies)
Discussion started by: emreatlier
2 Replies

2. Shell Programming and Scripting

stat command with ls -l

If i do ls -l i get the result rwx-rw-r ...... ............... file. How can i get the result in octal format. All other output will be the same as ls -l shows. The rwx-rw-r would be like 755 etc. (7 Replies)
Discussion started by: cola
7 Replies

3. Shell Programming and Scripting

hp-unix stat command to get last change date of file

I'm on hp-unix. I would like a variable to hold the last change date of a file. I looked at the man pages for stat, but I don't see any examples and can't get the syntax right. Can anyone help me? Thank you. (2 Replies)
Discussion started by: sboxtops
2 Replies

4. Windows & DOS: Issues & Discussions

Does PowerSHell have *stat command analogs?

I.e. like vmstat, cpustat, iostat, fsstat, kstat ..etc? (1 Reply)
Discussion started by: Xcislav
1 Replies

5. Shell Programming and Scripting

Need file timestamp without stat command

Hi all, I want to check whether a file is not updated in last 15 minutes, for this i need to get timestamp of file, (yyyy:mm:dd:hh:mi:ss). I dont have access to STAT command :(. Please suggest a program or command to do this . Thanks, Saravana (1 Reply)
Discussion started by: sam_1210
1 Replies

6. AIX

smitty equivalent command line command

i know after you do something in smitty via the gui, you can click something in smitty that will show you how to do the same thing via the command line, (not using the gui) can anyone tell me how (2 Replies)
Discussion started by: asyed123
2 Replies

7. Shell Programming and Scripting

AIX and HP-UX equivalent of Linux stat command

To list file permission/access right in octal format, linux has a command 'stat'. For example, we can use the followin - stat -c %a `find . -type f Is there any equivalent command in AIX and HP-UX to give the same result as linux 'stat' command? Please advice. (3 Replies)
Discussion started by: atanubanerji
3 Replies

8. UNIX for Dummies Questions & Answers

Stat command

i know this command does not exist in solaris. however, i read somewhere on this forum that basically everything the stat command provides in other oses can be obtained in solaris using the ls command. i've searched the forum for a while now and i cant find the thread. does anyone know about... (1 Reply)
Discussion started by: SkySmart
1 Replies

9. UNIX for Dummies Questions & Answers

Help with stat command

Hi Experts, I am here with very simple request: #!bin/bash a=`stat -c %y log1.csv` echo $a and this stat command returning value as 2013-08-11 05:42:10.000000000 -0400: But I want to see in mm/dd/yyyy format? any help is highly appreciated thank you ---------- Post... (9 Replies)
Discussion started by: parpaa
9 Replies

10. UNIX for Dummies Questions & Answers

Question on stat command

hello, I wanted to know which is the output of the stat command with a file, for example if I write on the terminal: stat ./unix.pdf i get the output: 754974726 6915670 -rwxrwxrwx 1 mbruno106 staff 0 90501 "Aug 13 13:26:02 2013" "Aug 13 13:26:02 2013" "Aug 13 13:26:02 2013" "Aug 13... (1 Reply)
Discussion started by: Marina2013
1 Replies
CUT-DIFF(1)							  Cutter's manual						       CUT-DIFF(1)

NAME
cut-diff - show difference between 2 files with color SYNOPSIS
cut-diff [option ...] file1 file2 DESCRIPTION
cut-diff is a diff command that uses diff feature in Cutter. It shows difference with color. It's recommended that you use a normal diff(1) when you want to use with patch(1) or you don't need color. OPTIONS
--version cut-diff shows its own version and exits. -c [yes|true|no|false|auto], --color=[yes|true|no|false|auto] If 'yes' or 'true' is specified, cut-diff uses colorized output by escape sequence. If 'no' or 'false' is specified, cut-diff never use colorized output. If 'auto' or the option is omitted, cut-diff uses colorized output if available. The default is auto. -u, --unified cut-diff uses unified diff format. --context-lines=LINES Shows diff context around LINES. All lines are shown by default. When unified diff format is used, 3 lines are shown by default. --label=LABEL, -L=LABEL Uses LABEL as a header label. The first--label option value is used as file1's label and the second --label option value is used asfile2's label. Labels are the same as file names by default. EXIT STATUS
The exit status is 0 for success, non-0 otherwise. TODO: 0 for non-difference, 1 for difference and non-0 for errors. EXAMPLE
In the following example, cut-diff shows difference between file1 and file2: % cut-diff file1 file2 In the following example, cut-diff shows difference between file1 and file2 with unified diff format: % cut-diff -u file1 file2 SEE ALSO
diff(1) Cutter February 2011 CUT-DIFF(1)
All times are GMT -4. The time now is 03:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy