From: Tuxedo on 18 Oct 2009 13:27 Usually, FreeBSD systems do not recognise the -h flag for the ls command, at least not those I 've been exposed to. Does anyone here know how to get the result of ls -lh on a FreeBSD? Stupid question I know; I mean many people on this group surely know how it is easily done. I guess by sort? Any examples would be appreciated. Many thanks in advance! Tuxedo
From: Allodoxaphobia on 18 Oct 2009 13:56 On Sun, 18 Oct 2009 19:27:19 +0200, Tuxedo wrote: > Usually, FreeBSD systems do not recognise the -h flag for the ls command, > at least not those I 've been exposed to. Does anyone here know how to get > the result of ls -lh on a FreeBSD? Stupid question I know; I mean many > people on this group surely know how it is easily done. I guess by sort? > > Any examples would be appreciated. huh? What do you mean by "Usually"? $ uname -a FreeBSD shell.example.com 7.2-RELEASE-p4 FreeBSD 7.2-RELEASE-p4 #0: Fri Oct 2 12:21:39 UTC 2009 $ ls -lh total 56 -rw------- 1 bonz bonz 1.1K Oct 7 16:27 SLRN7B6A2814.0 -rw------- 1 bonz bonz 1.2K Oct 7 16:27 SLRN7B6A2814.0.save -rw------- 1 bonz bonz 103B Oct 16 07:49 body.sxm -rw------- 1 bonz bonz 92B Oct 7 16:27 body.tmp drwx------ 2 bonz bonz 512B Oct 7 16:27 dist/ -rw------- 1 bonz bonz 0B Oct 18 11:05 loginfetch -rw------- 1 bonz bonz 163B Oct 18 11:15 newfetch -rw------- 1 bonz bonz 5.0K Oct 16 19:41 news.sxm -rw------- 1 bonz bonz 3.9K Oct 7 16:27 news.tmp drwx------ 2 bonz bonz 512B Oct 7 16:27 ng_lists/ -rw------- 1 bonz bonz 738B Oct 8 19:41 pico.24434.bak -rw------- 1 bonz bonz 4.2K Oct 17 15:21 pico.41973.bak -rw------- 1 bonz bonz 2.8K Oct 18 11:05 pmlogrotate.log -rw------- 1 bonz bonz 25B Oct 18 11:05 rslt.sxm -rw------- 1 bonz bonz 27B Oct 7 16:27 rslt.tmp -rw------- 1 bonz bonz 2.9K Oct 18 11:05 spamrotate.log -rw------- 1 bonz bonz 30B Oct 16 07:49 subj.sxm -rw------- 1 bonz bonz 30B Oct 7 16:27 subj.tmp drwx------ 3 bonz bonz 512B Oct 7 16:27 work/ -rw------- 1 bonz bonz 2.8K Oct 17 12:11 z_ng_posts Jonesy
From: Kaz Kylheku on 18 Oct 2009 14:23 On 2009-10-18, Tuxedo <tuxedo(a)mailinator.com> wrote: > Usually, FreeBSD systems do not recognise the -h flag for the ls command, > at least not those I 've been exposed to. Does anyone here know how to get > the result of ls -lh on a FreeBSD? Yes. Compile and install GNU coreutils. :)
From: Tuxedo on 18 Oct 2009 15:48 Allodoxaphobia wrote: [..] > huh? What do you mean by "Usually"? "Usually" just refers to various servers I'm using. But as the next post by Kaz Kylheku reveals, I apparently need GNU coreutils which must be missing from my system. Alternatively I need a later FreeBSD. My uname -a reveals I have a 4.8-RELEASE which sounds way older than yours! > > $ uname -a > FreeBSD shell.example.com 7.2-RELEASE-p4 FreeBSD 7.2-RELEASE-p4 #0: > Fri Oct 2 12:21:39 UTC 2009 > $ ls -lh > total 56 > -rw------- 1 bonz bonz 1.1K Oct 7 16:27 SLRN7B6A2814.0 [..]
From: Chris F.A. Johnson on 18 Oct 2009 17:18 On 2009-10-18, Tuxedo wrote: > Allodoxaphobia wrote: > > [..] > >> huh? What do you mean by "Usually"? > > "Usually" just refers to various servers I'm using. But as the next > post by Kaz Kylheku reveals, I apparently need GNU coreutils which must be > missing from my system. Alternatively I need a later FreeBSD. My uname -a > reveals I have a 4.8-RELEASE which sounds way older than yours! > >> >> $ uname -a >> FreeBSD shell.example.com 7.2-RELEASE-p4 FreeBSD 7.2-RELEASE-p4 #0: >> Fri Oct 2 12:21:39 UTC 2009 >> $ ls -lh >> total 56 >> -rw------- 1 bonz bonz 1.1K Oct 7 16:27 SLRN7B6A2814.0 > > [..] In both the 4.8 and 7.1 releases I use, the -h option is supported by the FreeBSD version of ls. -- Chris F.A. Johnson, author <http://shell.cfajohnson,com/> =================================================================== Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress) Pro Bash Programming: Scripting the GNU/Linux Shell (2009, Apress) ===== My code in this post, if any, assumes the POSIX locale ===== ===== and is released under the GNU General Public Licence =====
|
Next
|
Last
Pages: 1 2 Prev: conditional grep-like command Next: Want to write a script to note specific IP addresses. |