Last update, 25 April 2011
This is not only for Redhat, but for most of Linux machine (I think)
Source of this command is from here. I keep using them
http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/4/html/Step_by_Step_Guide/s1-manipulate-current.html
http://redhat.activeventure.com/71/gettingstartedguide/s1-managing-working-with-files.html
This is a good reference for VI - Visual Editor (Command line interface for text editor)
http://www.cs.colostate.edu/helpdocs/vi.html
Check folder size
du -hs /path/to/directory
Check harddisk space
df
List all the content within the current folder (or path)
ls OR ls -all
Remove file
rm thefilename.txt
Move file
mv thefilename.txt /home/asipo/
Delete directory and all its content
rm -rf /home/asipo/backupdocuments
Zip a file or folder
zip -r iWantTheZipFileNameToBeLikeThisOkay.zip theActualFileName.txt
Unzip a file (not sure for folder)
unzip thefilename.zip
Change folder owner
chown -R asipo.asigroup '/var/www/smellynomore/app/tmp'
Change folder permission
chmod -R 777 '/var/www/smellynomore/app/tmp'
Copy all except one folder
shopt -s extglob
cp -r A/!(B) dest_dir
Execute bin file
chmod u+x qt-sdk-linux-x86-opensource-2010.05.1.bin
./qt-sdk-linux-x86-opensource-2010.05.1.bin
Connect to server and control it (Telnet / SHH I think)
ssh -p 22 asipi@langit.com.my
No comments:
Post a Comment