You are viewing an old revision of this post, from April 4, 2014 @ 14:51:04. See below for differences between this version and the current revision.

Popular Linux commands

1. df -h  (calculating the size of server)
2. du -s directory (calculating the size of directory)
3. rm -rf directory/ (removing that directory and all childs of it)

4. resize2fs (after inscreasing disk space by using Amazon tools, we need to run this command to finish the inscreasing action)

5. cp -r /home/hope/files/* /home/hope/backup

In the above example the cp command would copy all files, directories, and subdirectories in the /home/hope/files directory to the /home/hope/backup directory.

6. Using vi command

vi /directory/filename.text

Press "INSERT" to begin editing content of file. Press "ESC" to stop editing file.

Press ":wq" to save content of file.

Press ":q!" to exit file without saving.

7. Remove extension from Centos

rpm -e extension_name --nodeps

8. Unmount s3

umount /path/s3

9. Change user for categories and files.

chown -R user_name directory_name

10. Change home directory for ftp user

usermod -d /home/directory user

11. Log in to root user from normal user without password

sudo -s 

12. Log in to root user from normal user with password

su

 

Revisions

Revision Differences

April 4, 2014 @ 14:51:04Current Revision
Content
Unchanged: <p>Unchanged: <p>
Unchanged: 1. df -h &nbsp;(calculating the size of server)<br />Unchanged: 1. df -h &nbsp;(calculating the size of server)<br />
Unchanged: 2. du -s directory (calculating the size of directory)<br />Unchanged: 2. du -s directory (calculating the size of directory)<br />
Unchanged: 3. rm -rf directory/ (removing that directory and all childs of it)Unchanged: 3. rm -rf directory/ (removing that directory and all childs of it)
Unchanged: </p>Unchanged: </p>
Unchanged: <pre>Unchanged: <pre>
Unchanged: 4. resize2fs (after inscreasing disk space by using Amazon tools, we need to run this command to finish the inscreasing action)</pre>Unchanged: 4. resize2fs (after inscreasing disk space by using Amazon tools, we need to run this command to finish the inscreasing action)</pre>
Unchanged: <p>Unchanged: <p>
Unchanged: <span>5. cp -r /home/hope/files/* /home/hope/backup</span>Unchanged: <span>5. cp -r /home/hope/files/* /home/hope/backup</span>
Unchanged: </p>Unchanged: </p>
Unchanged: <p>Unchanged: <p>
Unchanged: <span>In the above example the cp command would copy all files, directories, and subdirectories in the /home/hope/files directory to the /home/hope/backup directory.</span>Unchanged: <span>In the above example the cp command would copy all files, directories, and subdirectories in the /home/hope/files directory to the /home/hope/backup directory.</span>
Unchanged: </p>Unchanged: </p>
Unchanged: <p>Unchanged: <p>
Unchanged: 6. Using vi commandUnchanged: 6. Using vi command
Unchanged: </p>Unchanged: </p>
Unchanged: <p>Unchanged: <p>
Unchanged: vi /directory/filename.textUnchanged: vi /directory/filename.text
Unchanged: </p>Unchanged: </p>
Unchanged: <p>Unchanged: <p>
Unchanged: Press &quot;INSERT&quot; to begin editing content of file. Press &quot;ESC&quot; to stop editing file.Unchanged: Press &quot;INSERT&quot; to begin editing content of file. Press &quot;ESC&quot; to stop editing file.
Unchanged: </p>Unchanged: </p>
Unchanged: <p>Unchanged: <p>
Unchanged: Press &quot;:wq&quot; to save content of file.Unchanged: Press &quot;:wq&quot; to save content of file.
Unchanged: </p>Unchanged: </p>
Unchanged: <p>Unchanged: <p>
Unchanged: Press &quot;:q!&quot; to exit file without saving.Unchanged: Press &quot;:q!&quot; to exit file without saving.
Unchanged: </p>Unchanged: </p>
Unchanged: <p>Unchanged: <p>
Unchanged: 7. Remove extension from CentosUnchanged: 7. Remove extension from Centos
Unchanged: </p>Unchanged: </p>
Unchanged: <pre class="prettyprint">Unchanged: <pre class="prettyprint">
Unchanged: <span class="pln">rpm </span><span class="pun">- </span><span class="pln">e extension_name </span><span class="pun">- -</span><span class="pln">nodeps< /span></pre>Unchanged: <span class="pln">rpm </span><span class="pun">- </span><span class="pln">e extension_name </span><span class="pun">- -</span><span class="pln">nodeps< /span></pre>
Unchanged: <p>Unchanged: <p>
 Added: <span class="pln">8. Unmount s3</span>
 Added: </p>
 Added: <p>
 Added: <span class="pln">umount /path/s3</span>
 Added: </p>
 Added: <p>
 Added: <span class="pln">9. Change user for categories and files.</span>
 Added: </p>
 Added: <p>
 Added: <span class="pln">chown -R user_name directory_name</span>
 Added: </p>
 Added: <p>
 Added: 10. Change home directory for ftp user
 Added: </p>
 Added: <pre class="bbcode_code">
 Added: usermod -d /home/directory user</pre>
 Added: <p>
 Added: 11. Log in to root user from normal user without password
 Added: </p>
 Added: <p>
Deleted: &nbsp; Added: sudo -s&nbsp;
 Added: </p>
 Added: <p>
 Added: 12.&nbsp;<span style="line-height: 20.7999992370605px">Log in to root user from normal user with&nbsp;password</span>
 Added: </p>
 Added: <p>
 Added: <span style="line-height: 20.7999992370605px">su</span>
Unchanged: </p>Unchanged: </p>
Unchanged: <p>Unchanged: <p>
Unchanged: &nbsp;Unchanged: &nbsp;
Unchanged: </p>Unchanged: </p>

Note: Spaces may be added to comparison text to allow better line wrapping.

No comments yet.

Leave a Reply