Jump to content

  • Log in with Facebook Log in with Twitter Log In with Steam Log In with Google Sign In
  • Create Account

Tutorial info Visit support topic

  • Added on: Oct 13 2012 03:29 AM
  • Views: 621

25 Quick Linux Command Line Tips - Part 4

Following up recent quick linux CLI tip Part 3 here

Posted by PiNoY on Oct 13 2012 03:29 AM
76. How to change system date ?

# date -s "December 25 2007 01:01:01"

77. How to know your free base memory and other memory / swap statistics ?

# free

78. How to show disk space usage of your filesystem in human readable form?

# df -ah

79. How to get the top 10 of your mbox mail users?

# cd /var/spool/mail
# ls -lS | head -10

80. How to find process ID of a running service like httpd?

# pidof httpd

81. How to locate a binary file, command source and its man pages?

# whereis ping

82. How to find the location of a executable file that could have been executed when entered from a prompt?

# which ping

83. How to download ISO or any file from web using command line?

# wget -c www.google.com/testfile.txt
# wget -c ftp://google.com/google.ISO

84. How to transfer file via ssh?

# scp -c testfile.txt [email protected]

85. How to transfer files that has been only changed from one host to another without taking comparison?

# rsync -avz remoteserver:/home/remotefolder /home/localfolder

86. How to transfer your identity.pub into a remote machine's authorized_keys?

# ssh-copy-id -i identity-rsa-dsa.pub [email protected]

87. How to know who you are in a shell?

# whoami

88. How to get more real-time view linux process stats and info?

# top

89. How to issue a continuous trace route to a host?

# mtr host-ip-addres

90. How to trace route without resolving IP address?

# mtr --no-dns hostname

91. What is another text-based alternative to chkconfig?

# ntsysv

92. How to list out current cron jobs?

# crontab -l

93. How to get the CPU time?

# clock

94. How to set date and time from NTP server?

# ntpdate 0.fedora.pool.ntp.org

95. How to show current system path?

# set | grep PATH

96. How to list out currently loaded kernel modules?

# lsmod

97. How to know the total days of your system without reboot?

# uptime

98. How to get a system bootstrapped from redhat network?

# /usr/bin/go-rhn.sh

99. How to see current running user jobs?

# jobs

100. How to edit text files from terminal?

# vi textfile.txt
# nano textfile.txt
# joe textfile.txt
# vim textfile.txt
# pico textfile.txt (if pico is installed - Pico is a trademark of the University of Washington)
# tee vv