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
- November 7, 2014 @ 14:33:42 [Current Revision] by admin
- November 7, 2014 @ 14:33:42 by admin
- June 22, 2014 @ 12:34:40 by admin
- April 22, 2014 @ 18:12:51 by admin
- April 7, 2014 @ 15:19:34 by admin
- April 4, 2014 @ 14:51:04 by admin
- March 26, 2014 @ 16:36:38 by admin
- March 13, 2014 @ 11:20:24 by admin
- March 13, 2014 @ 11:11:29 by admin
Revision Differences
March 13, 2014 @ 11:11:29 | Current Revision | ||
---|---|---|---|
Content | |||
Unchanged: <p> | Unchanged: <p> | ||
Deleted: df -h (calculating the size of server)<br /> | Added: 1. df -h (calculating the size of server)<br /> | ||
Deleted: du -s directory (calculating the size of directory)<br /> | Added: 2. du -s directory (calculating the size of directory)<br /> | ||
Deleted: rm -rf directory/ (removing that directory and all childs of it) | Added: 3. rm -rf directory/ (removing that directory and all childs of it) | ||
Unchanged: </p> | Unchanged: </p> | ||
Added: <pre> | |||
Added: 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> | ||
Added: <span>5. cp -r /home/hope/files/* /home/hope/backup</span> | |||
Added: </p> | |||
Added: <p> | |||
Added: <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> | |||
Added: </p> | |||
Added: <p> | |||
Added: 6. Using vi command | |||
Added: </p> | |||
Added: <p> | |||
Added: vi /directory/filename.text | |||
Added: </p> | |||
Added: <p> | |||
Added: Press "INSERT" to begin editing content of file. Press "ESC" to stop editing file. | |||
Added: </p> | |||
Added: <p> | |||
Added: Press ":wq" to save content of file. | |||
Added: </p> | |||
Added: <p> | |||
Added: Press ":q!" to exit file without saving. | |||
Added: </p> | |||
Added: <p> | |||
Added: 7. Remove extension from Centos | |||
Added: </p> | |||
Added: <pre class="prettyprint"> | |||
Added: <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> | |||
Added: <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: | Added: sudo -s | ||
Added: </p> | |||
Added: <p> | |||
Added: 12. <span style="line-height: 20.7999992370605px">Log in to root user from normal user with password</span> | |||
Added: </p> | |||
Added: <p> | |||
Added: <span style="line-height: 20.7999992370605px">su</span> | |||
Unchanged: </p> | Unchanged: </p> | ||
Unchanged: <p> | Unchanged: <p> | ||
Unchanged: | Unchanged: | ||
Unchanged: </p> | Unchanged: </p> |
Note: Spaces may be added to comparison text to allow better line wrapping.
No comments yet.