Useful shortcuts for vi editor

Showing posts with label bash. Show all posts
Showing posts with label bash. Show all posts

Monday, 19 December 2016

bash: /bin/rm: Argument list too long error Solution

Command
rm -f *

Error 
bash: /bin/rm: Argument list too long error

Solution
Use following command line
$ find . -maxdepth 1 -name "*.txt" -print0 | xargs -0 rm

Friday, 10 October 2014

How to add a alias for using by all users in Linux?

Please edit /etc/bash.bashrc, for example;
  • alias c='cd' 
  • alias a='dir'
  • alias l='ls -l'
  • alias p='cd -'
  • alias '..'='cd ..'