When I press tab in a console I get this output
Display all 2957 possibilities? (y or n)
Is there any way to use grep
on these 2957 possibilities? I would like to search for all commands with the word "svn" in them.
When I press tab in a console I get this output
Display all 2957 possibilities? (y or n)
Is there any way to use grep
on these 2957 possibilities? I would like to search for all commands with the word "svn" in them.
I have Firefox in the start menu, but there are no "properties" like in Windows.
How do I find out were Firefox is installed and how do I check the path of link of a menu item?
Is there any way to check it from command line?
When I execute cron
I get this fault
cron: can't open or create /var/run/crond.pid: Permission denied
So, how to do it without cron
?
P.S. I want to check if file in svn has changed and I have a special script for it.
I have a command like this:
| grep -v @param | grep -v @return | grep -v @Test | grep -v @throws
And it's getting bigger. Is there a way to make this neater?
for example I have command that shows how much space folder takes
du folder | sort -n
it works great, however I would like to have human readable form
du -h folder
however if I do that than I cannot sort it as numeric.
How to join du folder
and du -h folder
to see output sorted as du folder
, but with first column from du -h folder
P.S. this is just an example. this technique might be very useful for me (if its possible)
The following grep
grep -r -e -n coll *
will display
fullpath/filename: <tag-name>coll</tag-name>
I would like to know what line has the following text, I tried adding -n
, but it did not work. I tried adding | grep -n *
, but it did something weird.
What I would like to see (I don't care about format) is
fullpath/filename:10: <tag-name>coll</tag-name>
I tried the following code to replace QQ
with ZZ
, but it doesn't do what I want:
var1=QQ
sed -i 's/$var1/ZZ/g' $file
However, this code does what I want:
sed -i 's/QQ/ZZ/g' $file
How do I use variables in sed
?
I would like to replace $fileWithPath
in $file
, however this doesn't work because (I think) path is not escaped. How to escape it?
sed -i 's/${fileWithPath}/HAHA/g' $file
I tried executing a script with this command:
./home/user/scripts/someScript
but it doesn't work:
No such file or directory
Any ideas?
I would like to add the .zip extension to all files. I tried this, however it does not work:
ls | awk '{print $1 " " $1".zip"}' | xargs mv -f
When I use program like svn
and I type in Gnome Terminal:
svn upd
and hit Tab it's autocompleted to:
svn update
Is it possible to do something like that in my custom bash script?
I tried doing that with export and set env, but it did not work. how to do it?
for example
~/directory$ export a.home=1
bash: export: `a.home=1': not a valid identifier
I want to set icon for Launcher. it has file named icon.xpm, but its being ignored by the icon set wizard. I tried to change it to .ico file, but it is still getting ignore. any ideas?
How do I delete a directory from a zip file using a bash script?
How to search for files containing specific word?
Is there any way to debug bash script without using echo and logging?
I'm talking about using breakpoints and stuff like that.
I don't believe in Trash Bin and when I delete something I want it to be gone forever, how to turn off the Trash?
P.S. When I delete files from the console do they also go to Trash?
I want to download a whole website (with sub-sites). Is there any tool for that?
I have a script in file bla.sh
and it is executable. When I click on it, the script is executed and the window is closed. I'd like the window to stay open.
Something like command cmd /k** command
in Windows.
P.S. I don't want to use pause
, but I want to able to write more commands after the script was executed.