HOWTO: linux terminal cheat sheet
Without spending too many words, here you go the image to set as background for your desktop
PS: most of them work also in OSX
Without spending too many words, here you go the image to set as background for your desktop
PS: most of them work also in OSX
Backup a MYSQL database is simple as to dump it. From a Unix shell:
#> mysqldump --opt -uUSER -pDBPASSWD -hHOSTNAME DBNAME > DUMPED_TEXTFILE
Ok, now you can dump it following this post.
questo e’ utile!
eh beh.. scrivo cavolate secondo te?
From a Unix shell:
#> mysql -hHOSTNAME -uUSER -pDBPASSWD DBNAME < DUMPED_TEXTFILE
Simple eh
Another useful and quick post about tips from OSX Terminal that let you to save a lot of time. So just open a Terminal and try them.
Do you have other useful tips? Post them in the comment!
Source and other tips, here.
I love control+R for CL
Added in the post!
If you use Firefox and sometime you can have a strange error that prevents its execute:
“Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system” (on OS X: “A copy of Firefox is already open. Only one copy of Firefox can be opened at a time“).
A window like the one below will appear:
No worries, the solution is pretty simple. It’s enough to delete these files:
Once deleted those files, launch again Firefox and it should work. If not, drop me a comment.
PS: Stefano, diegor has come back
Pretty simple.
#!/bin/sh for f in *; do g=`expr "xxx$f" : 'xxx\(.*\)' | tr '[A-Z]' '[a-z]'` mv -n "$f" "$g" done
and call it “rename.sh”
chmod u+x rename.sh
ls -1 | while read file ; do mv -nv “${file}” “$(echo “${file}” | tr ‘[A-Z]‘ ‘[a-z]‘)” ; done
Hi Luca, thanks for the trick.
I tried but it doen’t work.. I have this:
“namefile not overwritten”
It works only if I drop “-n” option from mv command (too risky!!)
When you edit a file with vim, it’s useful understand where the line ends especially if there are spaces at the end of the line. Instead checking all lines, you can highlight white spaces. How?
:set list

:set listchars=eol:$,tab:>-,trail:~,extends:>,precedes:<

Very simple and useful tip!
If you have any doubt, advice or something else, comment this post!
Source: Stackoverflow
Vim is my favourite text editor, i use it pretty anywhere
I’ll share a useful trick for commenting multiple lines of code:
1) SHIFT-V to select multiple lines;
2) Type “:s/^/#”
Where “^” indicates the beginning of a line and “#” the comment symbol of your choice.
To decomment a block of code:
1) Shift-V
2) Type “:s/^#//”
Diego Goretti on Facebook 12:30 pm on September 15, 2012 Permalink |
<3 oh che cosa meravigliosa!
Daniele Bastianini on Facebook 1:20 pm on September 15, 2012 Permalink |
cosa è linux?
Diego Russo on Facebook 8:33 pm on September 15, 2012 Permalink |
Daniele BSD è morta!
Daniele Bastianini on Facebook 11:45 pm on September 15, 2012 Permalink |
Non mi pare
Viva il diavoletto!