Below is a little CHMOD calculator I found on the Web. I took it because it was just too cute.
You can link to it here:
http://www.ss64.com/bash/chmod.html
Very simple, but I always seem to forget the format:
tar -cvvf name.tar dir/ –exclude dir_to_exclude directory
You actually need to use the full path and sometimes swap the order:
tar -cvf name.tar –exclude “/full/path/dir/exclude_this” /full/path/dir/
Here’s a couple more tar commands for good measure:
tar -cvvf file.tar file.txt (tar file)
tar -cvvf file.tar home/ (tar dir)
tar -xvvf file.tar (untar)
tar […]
Simple task, simple command:
php -v
For further reading, here’s the PHP documentation on command line usage:
http://www.php.net/features.commandline
You can check for your version of MySQL on the command line with the following:
# mysql –version
or
# mysql -V
I tried to search checking mysql version on the command line a couple times without success, so it’s going down here. The smart person would of course just read the mysql man page.
–version, -V
Display version information and […]
To chmod recursively, meaning directories and all directories within, you’d use the -R option:
chmod -R 755
From the chmod man page:
-R, –recursive
change files and directories recursively
This is all simple enough, but for some reason I always forget it. So here it is.
I’ve watched people search for character matches on Unix and Linux machines at times with not a lot of success. A very good way to make this search on a Unix/Linux box is to use the find, xargs, and grep commands:
find . | xargs grep “criteria”
This will allow you to search recursively for the criteria.
On […]
You can use the ‘cp’ command in Linux to copy a directory with all it’s files and accompanying sub directories with the following option:
cp -r directoryname newdirectory
Make sure that you do not tab through so as to create the backslash (I don’t know why that it, but it won’t work otherwise).
That’s it. Using the option […]