Difference between revisions of "Useful Linux commands"
Line 36: | Line 36: | ||
* (h)uman readable (s)ummary for disk usage of foldername <ref>https://www.ostechnix.com/find-size-directory-linux/</ref> | * (h)uman readable (s)ummary for disk usage of foldername <ref>https://www.ostechnix.com/find-size-directory-linux/</ref> | ||
+ | |||
+ | == lsof -ad3-999 -c rsync == | ||
+ | |||
+ | * to see what files rsync currently has opened <ref>https://askubuntu.com/questions/323775/monitor-watch-running-rsync-process/323782</ref> | ||
== References == | == References == | ||
<references /> | <references /> |
Revision as of 17:22, 11 December 2018
Contents
grep
grep -nr 'yourString*' .
The dot at the end searches the current directory. Meaning for each parameter:
-n Show relative line number in the file 'yourString*' String for search, followed by a wildcard character -r Recursively search subdirectories listed . Directory for search (current directory)
How to grep ps output with headers [1]
ps -ef | egrep "Download|PID"
FreeBSD
- su:
The su utility requests appropriate user credentials via PAM and switches to that user ID (the default user is the superuser). A shell is then executed.
pstree
- shows a tree of processes! [2]
du -sh foldername
- (h)uman readable (s)ummary for disk usage of foldername [3]
lsof -ad3-999 -c rsync
- to see what files rsync currently has opened [4]