Jump to content

25 Quick Linux Command Line Tips - Part 4


PiNoY

Recommended Posts

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 user@remote-hostname

 

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 user@remote-hostname

 

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

Edited by Fearless News
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.