Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Linux Ask!

Jun 102010
 

List 10 most often used commands

Answer:

You can list the top 10 most often used commands in your Linux, by the following method.

# history | awk '{a[$2]++}END{for(i in a){print a[i] " " i}}' | sort -rn | head 

135 ls
63 cd
48 exit
46 sudo
34 tail
30 cat
29 df
18 date
17 vi
12 pwd
Jun 082010
 

How to ignore dummy files (e.g. from CVS, SVN) during rsync?

Answer:

During rsync, you might want to ignore a lot of dummy files, e.g. .bak, .svn, .old files, you can use the following flag as part of your rsync command.

# rsync --cvs-exclude ...

List of files skipped (rsync 3.06):

RCS SCCS CVS CVS.adm RCSLOG cvslog.* tags TAGS .make.state .nse_depinfo *~ #* .#* ,* _$* *$ *.old *.bak *.BAK *.orig *.rej .del-* *.a *.olb *.o *.obj *.so *.exe *.Z *.elc *.ln core .svn/ .git/ .bzr/