changing default value

Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers changing default value
# 1  
Old 08-28-2011
changing default value

is there a simple way to change the default value of a file size shown from byte to megabyte when calling commands like wc -c; ls -l; du; etc.

BTW i'm running FreeBSD (OS X)
# 2  
Old 08-28-2011
du -m
wc # no but you can do the division yourself
man ls # don't have access to a OS X system at the moment but there should be an option.
# 3  
Old 08-28-2011
The GNU coreutils have the BLOCK_SIZE variable, but given you're on BSD, I suppose you're only option is to use -h (human readable) option with ls and du and, of course, the output will not exactly match your requirement.

I believe that wc's -c means explicitly bytes and its output is not affected by the value of the BLOCK_SIZE variable even on GNU systems.

P.S. Just read the above post, yes, du may have the appropriate option.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. HP-UX

Changing default shell to bash

According to multiple sources you should not change the default shell to bash for the root user because it will make the system unbootable. Is there a safe way to launch bash for root when logging in? Perhaps I can edit /etc/profile or add it to a startup script somewhere? (2 Replies)
Discussion started by: bstring
2 Replies

2. Shell Programming and Scripting

Changing default prompt

Hi, i was wondering if it is possible to change the default prompt for the shells that are availble on your system? For example, i want to change the prompt for the C shell from % to something like ( or ). Thanks, Nav. (7 Replies)
Discussion started by: Navs_
7 Replies

3. UNIX for Dummies Questions & Answers

Changing default PDF opener

Hi, I want to open a pdf file in my PCLinuxOS, but when I click on the PDF file to open it, a message box prompts asking for Open With : KGhostView ; Save File....etc. So the default pdf genereator to open is set to KGhostView. How do I change the default to KPdf, another pdf generator.. ... (3 Replies)
Discussion started by: anaigini45
3 Replies

4. UNIX for Dummies Questions & Answers

Changing default login shell

Hi everybody, The problem is quite simple, I want to change my default shell which is /bin/csh to /bin/bash. I have looked online for solutions to my problem, but to no avail. I have tried chsh, but it tells me this: chsh: can only change local entries; use ypchsh instead. I use ypchsh,... (7 Replies)
Discussion started by: z1dane
7 Replies

5. OS X (Apple)

Changing Default Shell

I bought a used MacBook G4 with Tiger 10.4.11 Running fine, then I noticed a few things were missing. I don't have Terminal or Netinfo Manager in my Utilities! I downloaded iTerm, but for some reason my shell is set to /dev/null I know I can change my shell using Netinfo Manager, but I don't... (5 Replies)
Discussion started by: Ricardo-san
5 Replies

6. Solaris

Changing default 'FORMAT' variables.

In FORMAT->ANALYZE->SETUP there's a couple variables you can set for the various functions. However, everytime I exit format it reverts back to the defaults. Is there a file I can edit somewhere to change these default settings? (0 Replies)
Discussion started by: cheetobandito
0 Replies

7. Shell Programming and Scripting

Changing userID and Changing group and GID

Hello, I want to write a ksh script about changing UID and changing group with GID. There are multiple servers i want to perform that job. linux1 linux2 linux3 linux4 linux5 ...... . . . . . 1.) How can i enter "password" in script rather asking me? I was trying this... ssh... (2 Replies)
Discussion started by: deal732
2 Replies

8. Solaris

Changing the default network Interface

Hello: I have a Sun E250 with an on board hme0 interface, I also have installed a gigabit ethernet (GE0) card. When the system boots up it defaults to the on board Hme0 card. I would like it to default to the GE0 card. I believe this can be done thru the OK prompt using the show-nets and... (1 Reply)
Discussion started by: rambo15
1 Replies

9. UNIX for Dummies Questions & Answers

changing default file permissions

How can I change the default permissions that are assigned when I create a file? (By default the file has: -rw-r--r-- ..... I'd like it to be -rw-r----- How can I change this default behavior? (8 Replies)
Discussion started by: FredSmith
8 Replies

10. UNIX for Dummies Questions & Answers

Changing default editor

Redhat 9 I want to change my default text editor from vi to pico. When I look in the .bash_profile or .bashrc I do not see the EDITOR variable. So how do I change the default permanently? (1 Reply)
Discussion started by: Tony Empire
1 Replies
Login or Register to Ask a Question