Command |
Description |
sudo -s |
switch to "supreme" (admin) user |
chmod -R 777 * |
change file/dir permissions to all read/write/execute |
ssh -X [GTid]@demo.vip.gatech.edu |
connect to the REMOTE server |
grep -iRn "searchpattern" * |
recursivley search for pattern in files |
who |
who is logged in |
tree -a |
directory structure |
gnome-panel |
server GUI via X-windows |
gnome-system-monitor |
resource usage GUI |
system-config-services |
start/restart/stop server services |
/etc/init.d/httpd start |
start apache with ssl support,password: csip |
mysqldump --single-transaction --skip-add-locks dbname tbname -u root -p > file.sql |
backup database "dbname" to a sql file |
sudo rsync -vaz /home/ITSdrive/ /media/ITSbackup/BACKUP/ITSdrive |
backup files from source to destination folder |
rsync -a -e ssh source/ username@remotemachine.com:/path/to/destination/ |
backup files from source to server destination |
sed -i 's/str_old/str_new/g' * |
recursivley search pattern and replace in files in current directory [ref] |
perl -p -i -e 's/oldstring/newstring/g' `grep -ril searchpattern *` |
recursivley search pattern and replace in files |
find . -name '*.php' | xargs wc -l |
count number of PHP lines in a directory |
sudo find . -name file.txt -exec rm {} \; |
find and delete instances of file.txt |
df -h | disk space |
fusermount -u | mount disk |
fdisk -l | list mounted disks |
mount -t ntfs-3g /dev/sdb1 /mnt/disk -o force |
mount external HD |
fusermount -u <mountpoint> |
mount disks |
fuser -m /edv/sdc1 |
|
convert -density 300 -depth 8 -quality 100 -trim FILE.pdf FILE.png |
convert PDF image to PNG |
iptables -I INPUT -p tcp --dport 1022 -j ACCEPT |
With ssh and firewall, to open port |
uname -a
lsb_release -a |
Check Ubuntu installed version |
do-release-upgrade
apt-get dist-upgrade |
Upgrade Ubuntu to the latest release |