shell variable

A quick question from my mail bag: How do I display or get the date when a file was last time accessed? The best and simplest way is to use stat command. It displays file or file system status such as: => File size => File type => Inode number => UID/GID => File access […]

{ 17 comments }

A shell variable may be assigned to by a statement using following syntax: var=value If value is not given, the variable is assigned the null string. In shell program it is quite useful to provide default value for variables. For example consider rsync.sh script: #!/bin/bash RSRC=$1 LOCAL=$2 rsync -avz -e ‘ssh ‘ user@myserver:$RSRC $LOCAL This […]

{ 4 comments }