{"id":559,"date":"2012-11-22T15:27:29","date_gmt":"2012-11-22T12:27:29","guid":{"rendered":"http:\/\/www.fatihacar.com\/blog\/?p=559"},"modified":"2015-08-07T10:48:55","modified_gmt":"2015-08-07T07:48:55","slug":"frequently-used-linux-commands-and-details","status":"publish","type":"post","link":"http:\/\/www.fatihacar.com\/blog\/frequently-used-linux-commands-and-details\/","title":{"rendered":"Frequently Used Linux Commands And Details"},"content":{"rendered":"<p><strong>copy<\/strong><\/p>\n<blockquote><p>\n<strong>Basic Copy<\/strong><br \/>\n[root@test ~]# cp -R \/olddirectory\/ \/newdirectory\/<br \/>\n-R parameter mean that copy all subfiles and subdirectories<br \/>\n<strong>Copy directories and files with permissions<\/strong><br \/>\n[root@test ~]# cp -R -pf \/olddirectory\/ \/newdirectory\/\n<\/p><\/blockquote>\n<p><strong>blkid<\/strong><\/p>\n<blockquote><p>\nblkid have been using for show uuid of disk partitions. You can use uuid to add in \/etc\/fstab file. fstab<br \/>\n<strong>For show all partitions&#8217;s uuid<\/strong><br \/>\n[root@test ~]# blkid<br \/>\n<strong>For specific show partition&#8217;s uuid<\/strong><br \/>\n[root@test ~]# blkid \/dev\/sdb1<br \/>\n<strong>Result Example<\/strong><br \/>\n[root@test ~]# 6423fsdf818-f12d-67a6-91ac-124sf124fe\n<\/p><\/blockquote>\n<p><strong>mount and umount<\/strong><\/p>\n<blockquote><p>\nMount command has been using for partititons assign to directory. Umount has been using to remove the assignment.<br \/>\n<strong>Mount<\/strong><br \/>\n[root@test ~]# mount \/dev\/sdb1 \/newdirectory<br \/>\n<strong>Umount<\/strong><br \/>\n[root@test ~]# umount \/newdirectory\n<\/p><\/blockquote>\n<p><strong>updatedb<\/strong><\/p>\n<blockquote><p>\nupdatedb has been using that new locations of files have been writing to locate map.<br \/>\n<strong>updatedb<\/strong><br \/>\n[root@test ~]# updatedb<br \/>\nIf programs or files are newly installed, you can use updatedb to update locate map.\n<\/p><\/blockquote>\n<p><strong>ps<\/strong><\/p>\n<blockquote><p>\nps has been using to list of linux processes.<br \/>\n<strong>updatedb<\/strong><br \/>\n[root@test ~]# ps -ef | grep asm   < list of asm processes\n[root@test ~]# ps -ef | wc -l   < count of all processes\n[root@test ~]# ps -ef | grep oracle | wc -l   < count of oracle processes\n<\/p><\/blockquote>\n<p><strong>kill<\/strong><\/p>\n<blockquote><p>\nkill has been using to drop of linux processes. You can take process id with ps command.<br \/>\n<strong>updatedb<\/strong><br \/>\n[root@test ~]# kill -9 process_id   < list of asm processes\n<\/p><\/blockquote>\n<p><strong>top<\/strong><\/p>\n<blockquote><p>\ntop has been using to list of linux activities and monitor system resources.<br \/>\n<strong>top<\/strong><br \/>\n[root@test ~]# top   < list of all processes\n[root@test ~]# top u oracle   < list of oracle processes\n[root@test ~]# top u oracle c  < list of all processes with detail\n<\/p><\/blockquote>\n<p><strong>free<\/strong><\/p>\n<blockquote><p>\nfree has been using to monitor using amount of memory resource.<br \/>\n<strong>top<\/strong><br \/>\n[root@test ~]# free   < basic list\n[root@test ~]# free -m    < list as result mb\n[root@test ~]# watch free  < watch memory as online.\n<\/p><\/blockquote>\n<p><strong>delete history<\/strong><\/p>\n<blockquote><p>\nTo Delete only connected user history.<br \/>\n[root@test ~]# history -cw\n<\/p><\/blockquote>\n<p><strong>disk usage<\/strong><\/p>\n<blockquote><p>\n[root@test ~]# du<br \/>\nto calculate as megabayt<br \/>\n[root@test ~]# du -h<br \/>\nto calculate as megabayt and directory base<br \/>\n[root@test ~]# du -sh\n<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>copy Basic Copy [root@test ~]# cp -R \/olddirectory\/ \/newdirectory\/ -R parameter mean that copy all subfiles and subdirectories Copy directories and files with permissions [root@test ~]# cp -R -pf \/olddirectory\/ \/newdirectory\/ blkid blkid have been using for show uuid of disk partitions. You can use uuid to add in \/etc\/fstab file. fstab For show all&#8230;<\/p>\n","protected":false},"author":37,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[18],"tags":[31,22],"class_list":["post-559","post","type-post","status-publish","format-standard","hentry","category-linux-unix","tag-linux-administration","tag-system-administration"],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p39NFI-91","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"http:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/posts\/559","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/users\/37"}],"replies":[{"embeddable":true,"href":"http:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/comments?post=559"}],"version-history":[{"count":18,"href":"http:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/posts\/559\/revisions"}],"predecessor-version":[{"id":1413,"href":"http:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/posts\/559\/revisions\/1413"}],"wp:attachment":[{"href":"http:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/media?parent=559"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/categories?post=559"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/tags?post=559"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}