Tagged: linux

How to get a previous date in bash (linux) 0

How to get a previous date in bash (linux)

Simply put date -d ‘1 day ago’ +’%Y-%m-%d’ # For multiple days date -d ‘7 days ago’ +’%Y-%m-%d’ If you wish to place in a shell script: RMDATE=$(date -d ‘7 days ago’ +’%Y_%m_%d’) will...

How to change date and timezone in linux 0

How to change date and timezone in linux

To change date: date -s “18 JUN 2013 12:22:00” To change timezone: sudo dpkg-reconfigure tzdata   NOTE: After changing linux date/time/timezone make sure you restart cron with: /etc/init.d/cron stop /etc/init.d/cron start #or in Ubuntu/Debian...

How to mount samba share on linux using fstab 0

How to mount samba share on linux using fstab

# Debian/Ubuntu apt-get install smbfs smbclient # Fedora/Redhat yum install smbfs samba-client #If not found try smbclient mkdir /mnt/dirname //fileserver/sharename /mnt/dirname smbfs username=root,password=mypass 0 0 NOTES: How to find shares on a remote linux...