The following command gets all the files that you recently added but not commited yet:
$ git diff --cached --name-only --diff-filter=A
Details:
--name-only: shows all the files you changed relative to HEAD.
--name-status: to get the status symbol too.
--diff-filter=A: shows only the new recently added fil...
Tuesday, June 28, 2016
Monday, June 27, 2016
VMware - Fix copy and paste between host and guest
Try to reinstall VMware Tools. Follow the instructions from:
https://www.vmware.com/support/ws55/doc/new_guest_tools_ws.h...
Erase all files/directories except some of them
To erase all directories except one, execute the following:
$ find . -maxdepth 1 -not -name [file/directory_name] -exec rm -R {} \;
Where:
-maxdepth: prevents to erase recursively inside the directory to keep.
If you want to be sure that the correct files will be removed, run first the beginning part of the command(before "-exec") and when you are sure, execute the complete command:
$ find ....
Shortcuts to move the cursor on a terminal command line
Ctrl + a : Moves the cursor to the line start.
.
Ctrl + e : Moves the cursor to the line end (remember e for end).
Alt + f : Moves the cursor forward one word (remember f for forward) .
Alt + b : Moves the cursor backward one word (remember b for backward) .
Ctrl + x + x: Moves the cursor to the line start and to the end...
Friday, June 24, 2016
Thursday, June 23, 2016
Git - Checking changes on origin repository against your local
Make a fetch to update the remote branch latest version status in your repository:
$ git fetch origin [Your remote branch]
fetch does not change anything in your local repository, only updates the information against the branch selected.
Check differences with diff:
$ git diff origin/[Your remote branch...
Wednesday, June 22, 2016
Git - Commit project to new branch
Create a new branch and move your project to it:
$ git checkout -b [New Branch]
If you have modified or created files, add them to the project:
$ git add [Your modified or new files]
Commit your changes:
$ git commit -m '[Your Comments]'
Push the project to the new branch:
$ git push origin [New Branch]
See also:
https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merg...
Monday, June 13, 2016
Uninstall driver from unixODBC using odbcinst
To uninstall driver from unixODBC using odbcinst, execute:
$ sudo odbcinst -u -d -n [Driver_name]
FreeTDS has been deleted (if it existed at all) because its usage count
became ze...
Uninstall DSN from unixODBC using odbcinst
To uninstall a DSN from unixODBC use:
$ odbcinst -u -s -n [your_DSN_name]
odbcinst: DSN removed (if it existed at all). ODBC_BOTH_DSN was used as
the search path...
Friday, June 10, 2016
Install Sublime Text 3
Download Sublime Text 3:
wget https://download.sublimetext.com/sublime_text_3_build_3114_x64.tar.bz2
Uncompress tarball:
sudo tar vxjf sublime_text_3_build_3114_x64.tar.bz2
Move sublime directory to /opt:
sudo mv sublime_text_3 /opt/
Create symbolic link to sublime:
sudo ln -s /opt/sublime_text_3/sublime_text /usr/bin/sublime
Execute sublime and enjoy!:
subl...
Thursday, June 9, 2016
Git - Usefull commands
- Delete branch of current project:
git remote remove origin
- Add current project to a branch:
git remote add origin [remote repository]
- Clone a specific branch:
git clone -b [branch] [remote reposito...
Git - Steps to commit a project
1. Show the status(how many new files, deleted files, modified files, etc.):
$ git status
2. Add all files to the project:
$ git add -A
the -A option means track all including deleted files.
3. Commit:
$ git commit -m "[Comments]"
the -m option gives you the possibility to add your comments in the same line.
4. Push:
$ git push -u origin master
The -u is optional and what it does is sets your...
Popular Posts
-
The man page says: EINVAL A new segment was to be created and size < SHMMIN or size > SHMMAX, or no new segment was to be created, ...
-
To swap column 2 and 3 in a 4 column file: awk -F, '{print $1,$3,$2,$4}' OFS=; " FILE " > NEW_FILE where: OFS: ind...
-
Write the web service's response(xml, json, plain text) in a file, and then run the following in a terminal: $ while true; do echo -e...
-
If you want to delete a single route from the route table, you have to specify enough parameters to make this route unique. For example, t...
-
ENOSPC returns from msgget indicates that the system-wide maximum number of message queues has been reached. Solution: Change this lim...
-
To uninstall driver from unixODBC using odbcinst, execute: $ sudo odbcinst -u -d -n [ Driver_name ] FreeTDS has been deleted (if it existed...
-
Designed by Freepik You have a group of files and some of them are compressed with zip or gz and you want to search for a specific tex...
-
Shorcuts Ctrl + W - Erase one word in the current line. !! - Repeats the last command. Ctrl + Z - Stops the current command, Ctr...
-
The history command can be used to list all the previous commands you have typed before. The syntax is as following: history n where n ...
-
To erase files older than 24 hours ago: find . -mmin +1440 -exec rm -fr {} \ 24 hours = 24 * 60 minutes = 1440 minutes
Recent Posts
Categories
.bash
.bashrc
action
awk
bash
branch
changes
chmod
chown
color
column
command line
commands
commit
compress
compress files
compressed
config
console
convert
copy
CR-LF
create
cut
delete
desktop
diff
directories
directory
dos
driver
erase
error
etc
except
exclude
extract files
fetch
find
format
git
gnome
gz
hash
hostname
init.d
install
integrity
ipc
kernel
linux
list
ls
md5
mock
msgget
mysql
netcat
networking
newlines
odbc
odbcinst
openvpn
owner
passwd
paste
permissions
queue
quick guide
rc.d
readline
reboot
recursively
redhat
release
remove
rm
route
routing
scp
screen
script
selinux
shell
shmget
shortcuts
shutdown
SIOCDELRT
start
stderr
stdout
sublime text
sublime text 3
swap
sysctl
tail
tar
tar.gz
tcp
tcpdump
tee
terminal
test
truncate
udp
uname
uninstall
unixODBC
user
useradd
version
view
vpn
webservice
zgrep
zip
Unordered List
Text Widget
Pages
Blog Archive
-
▼
2016
(40)
-
▼
June
(14)
- Git - Get new recently added files but yet not com...
- VMware - Fix copy and paste between host and guest
- Erase all files/directories except some of them
- Shortcuts to move the cursor on a terminal command...
- Create a new user
- Get RedHat version
- Git - Checking changes on origin repository agains...
- Git - Commit project to new branch
- Uninstall driver from unixODBC using odbcinst
- Uninstall DSN from unixODBC using odbcinst
- Reload .bashrc without logging out and logging in
- Install Sublime Text 3
- Git - Usefull commands
- Git - Steps to commit a project
-
▼
June
(14)
About Me
Search This Blog
Powered by Blogger.