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

No comments yet.

Leave a Reply