Forum Discussion
F5 terminal - help to run commands - disk space full
If you're seeing the prompt you've quoted then you are currently in tmsh, rather than bash, which is why your 'df' command isn't working! Easy mistake to make if you are unfamiliar with BIG-IP architecture :)
root@(perm-vm16)(cfg-sync Standalone)(Active)(/Common)(tmos)# df -h
Syntax Error: unexpected argument "df"
root@(perm-vm16)(cfg-sync Standalone)(Active)(/Common)(tmos)# bash
[root@perm-vm16:Active:Standalone] config # df -h
Filesystem Size Used Avail Use% Mounted on
Assuming your user account has been granted a sufficiently privileged role, simply running 'bash' in the tmsh shell will drop you to a root privilege bash shell, however if you are a lower privileged user (say, Operator role) you might simply receive an error; in this case you'll need a more privileged account:
op-test@(perm-vm16)(cfg-sync Standalone)(Active)(/Common)(tmos)# bash
Syntax Error: "bash" unexpected argument
hi yes i've just figured out how to use bash
now i want to delete log file contents, ideally var log and free up some space, can you help AaronJB please?
i prefer to use bash but i do not want to disrupt any services
- AaronJBApr 26, 2024SIRT
You can pretty safely delete anything in /var/log with a numerical extension like .1 or .2.gz as those are old rotated-out logfiles - if you need to delete any logs which are currently being written to then the best thing is to delete the historical logs and then force log rotation to happen (some help possibly here: https://my.f5.com/manage/s/article/K13367 )
Also have a good look in the following locations for suspiciously large files - I've seen people accidentally record huge pcaps there on more than one occasion:
/config
/rootAlso this directory usually holds software images - they can be large and consume a lot of space on small systems:
/shared/imagesSearching the entire filesystem for the largest files can also sometimes net good rewards, but it's a slow process:
du -a / | sort -n -r | head -n 20
HTH!
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com