Find all the files in a directory that has particular text on the first line of the file
find GA.Allocation/ -name *.cs -exec head {} -n 1 \; | grep pattern
Find all the files in a directory that has particular text on the first line of the file
find GA.Allocation/ -name *.cs -exec head {} -n 1 \; | grep pattern
Mounting windows share in Linux is pretty simple:
mount -t cifs //server/share -o username=user,password=password /mnt/windows_share
Sometimes Windows shares can have space in their name and in this case you need to replace space to “\040“:
mount -t cifs //server/share\040name -o username=user,password=password /mnt/share
Go to “about:config”
Set “browser.backspace_action” to either 0 or 1
0 – Pressing backspace button will go back a page in the session history
1 – Pressing backspace button will scroll up a page in the current document and
[Shift]+[Backspace] will scroll down.
Boot from Linux CD with ntchpw
utility installed. Most of the time I used PING. Pretty sure most of Live CD’s do have that utility.
Mount Windows partition to Linux:
ntfs-3g /dev/hda1 /mnt/ntfs
OR
mount -t ntfs-3g /dev/hda1 /mnt/ntfs -o force
The last one is used if windows did not shut down properly.
In Windows partition Navigate to WINDOWS/system32/config
Execute chntpw SAM
. As a safety measure you can copy SAM file somewhere available to restore, if things go wrong.
This utility will ask you number of options. Blank the password, do not set a new one. Agree to write hive files when finish.
Restart computer to boot into Windows.
By default chntpw
is loading administrator account. You can load another user if required. Read man page for chntpw to figure out how to do this.
If you want Firefox to open a link in a new tab when you click on it with middle button do this:
in about:config
change middlemouse.contentLoadURL
to false
Put into your Linux box a HDD with NTFS system on it.. you would want to be able to read and write to it under user account, not only as root.
root#: fdisk -l
To find all the hard drives installed in your system.. locate the one that looks like freshly installed and
root#: mount -t ntfs-3g /dev/sdb1 /mnt/hdd -o force,uid=userID
where sdb1 is the name of that HDD you want to mount, and userID is your username.