I made a change in the blogger configuration to ease the later work when blogging. It is possible that older entries are not correctly formatted.

Showing posts with label commandline. Show all posts
Showing posts with label commandline. Show all posts

Monday, 24 June 2013

python useful packages in combination with command line

I have been playing with python lately and discovered at least two small utility pacages providing useful features in combination with the commandline. For this reason I created two aliases:

alias openurl='python3 -m webbrowser -t'
alias webshare='python -m SimpleHTTPServer'

The first one opens a web page at the url given as a parameter, if the url does not have a protocol, e.g. http, then the command will interpret it as a local file. The second one starts a webserver for the directory where the command is called. Then you can provide in that way a simple mean of letting someone download local files.

Thursday, 10 June 2010

ac - user connect time

I just discovered a new command that I did not know: ac. It gives the connect times of users. This may prove useful.

Monday, 8 March 2010

commandlinefu

I bought a number of linux magazine during my week holiday and discovered a number of new interesting, useful things:

  • Ubuntu One, a way to store data on some ubuntu servers to share it with other ubuntu users (I must check that)
  • Writer's Cafe, a tool helping creative writing
  • impro-visor, some GPL software working with lead sheets.

And one thing I really found useful is: commandlinefu (http://www.commandlinefu.com/). This site provides a way for people to advertise useful commandline tricks. I should probably follow them, I will learn a lot. And it already started.

I already learnt a new useful command: youtube-dl. Say you have some google URL:

http://www.youtube.com/watch?v=1504cSBhWG0

And you want to get the url of the file being downloaded, then you can use (-b for best quality and -g for just getting the url): $> youtube-dl -b -g http://www.youtube.com/watch?v=1504cSBhWG0

Of course this command has a certain number of options.

Sunday, 27 September 2009

newgrp - (su for groups)

Well reading an old linux magazine I learnt some thing about the command: newgrp and groups in general.

First of all, the difference between primary and secondary groups in UNIX was not completely clear to me.

First of all, a primary or secondary group is the role played by a group for specific user. There is one and only one primary group per user, where as there may be a number of secondary groups (as then defined in /etc/groups.

Moreover, I learnt you could use the command: newgrp to login and perform all operation with the other group identity. It can be seen as a kind of su. Also groups may have passwords which can be set and used by their users.

I also learnt there are also sticky bits and setguid for files and that they correspond to the same functionality that setuid and the sticky bits for files.