mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-02 10:16:21 +00:00
Add new 'rh' command to show the filesize in human format
This commit is contained in:
parent
94271f186c
commit
e97d7bd90a
@ -204,6 +204,7 @@ static const char *help_msg_r[] = {
|
||||
"r-", "num", "remove num bytes, move following data down",
|
||||
"r+", "num", "insert num bytes, move following data up",
|
||||
"rm" ," [file]", "remove file",
|
||||
"rh" ,"", "show size in human format",
|
||||
"r2" ," [file]", "launch r2",
|
||||
NULL
|
||||
};
|
||||
@ -1053,6 +1054,15 @@ static int cmd_resize(void *data, const char *input) {
|
||||
}
|
||||
}
|
||||
return true;
|
||||
case 'h':
|
||||
if (core->file) {
|
||||
if (oldsize != -1) {
|
||||
char *s = r_num_units (NULL, oldsize);
|
||||
r_cons_printf ("%s\n", s);
|
||||
free (s);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
case '+': // "r+"
|
||||
case '-': // "r-"
|
||||
delta = (st64)r_num_math (core->num, input);
|
||||
|
Loading…
Reference in New Issue
Block a user