sudo smbmount //192.168.2.28/projects /mnt/projects -o user=USERNAME
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 place for example ‘2013-07-01’ in the RMDATE variable which of course you can use like
I wrote a lil script to help out with this.. The syntax is as follows:
How this works is by lighting up the corresponding drive on the front panel for about 3 seconds.
#!/bin/sh cmd="dd if=/dev/$1 of=/dev/null" seconds=3 echo "Check front panel for indicator light" $cmd& cmdpid=$! sleep $seconds if [ -d /proc/$cmdpid ] then # echo "terminating program PID:$cmdpid" kill $cmdpid fi
Credits: Fabio’s Blog
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 based OS's service cron stop service cron start
Follow this template
//10.0.10.20/myshare/mysubfolder /radio cifs username=root,password=mycifspw,uid=www-data,gid=root 0 0
To use windows Remote Desktop Connection to connect to a linux pc. Simply install xrdp on the linux pc.
sudo apt-get install xrdp
Thats it! Youre done!
If for any reason you encounter any problems.. the solution is supposedly either
echo "gnome-session --session=ubuntu-2d" > ~/.xsession
sudo apt-get install gnome-session-fallback
You normally have to do this when you are dual booting and your windows partition is in a state of hibernation.. Linux sees this and refuses to touch files
Complicated Linux Suggested Method:
sudo mount -t "ntfs" -ro "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,dmask=0077,fmask=0177" "/dev/sda2" "~/Desktop/D/"
Where ‘D’ is a folder you previously created to mount the drive (mkdir ~/Desktop/D)
If for some reason this doesnt work.. you can force delete the hibernation data by
mount -t ntfs-3g -o remove_hiberfile /dev/sda2 ~/Desktop/myplacetomount
# 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
How to find shares on a remote linux PC
smbclient -L jumbo -Uusername -I ip-address
How to manually mount fstab