./myscript.py filename
./myscript.py in.file output.file
./myscript.py -i in.file -o output.file
How do I pass and parse command-line options and arguments using Python under Unix like operating systems?
{ 3 comments }
./myscript.py filename
./myscript.py in.file output.file
./myscript.py -i in.file -o output.file
How do I pass and parse command-line options and arguments using Python under Unix like operating systems?
{ 3 comments }
I‘m using a Mac OS X and combination of ssh-agent+ssh-add to adds RSA or DSA identities to the authentication agent. ssh-agent provides me a secure way of storing the private key. However, I’d like to expire identities added to the agent within half an hour. How do I set lifetime of identities added to the agent under Unix / Linux / BSD / Apple OS X operating systems?
{ 0 comments }
I am trying to use xargs command using shell pipes and not able to understand how to control and use command line arguments. For example I’d like to find out all *.c file located in 100s of sub-directories and move them to another directory called ~/old.src. How do I use command line args with xargs to achieve the same?
{ 47 comments }
Q. I’ve couple of large tarballs such as www.tar and images.tar. Is it possible to extract a single file or a list of files from a large tarball such as images.tar instead of extracting the entire tarball? How do I extract specific files under Linux / UNIX operating systems?
{ 20 comments }
Q. I’ve backup created using rsync command stored at /disk2/home/tom/ directory. Accidentally, I had deleted files from /home/tom directory. I’d like to restore all file names starting with alpha numeric characters from /disk2/home/tom/ to /home/tom. How do I restore selected files in a batch mode?
{ 0 comments }