Wednesday 17 December 2014

Helpful Linux Terminal Commands

Okay, so I would be compiling a list of helpful linux commands for getting you out of that jam in no time.

REPAIRING A CORRUPT ZIP FILE

You have downloaded a large zip file, with possibly several files in the archive but your Internet connection decides to mess up at the last minute and so a few files at the end have not been downloaded. As a result, there is an end of file (EOF) error and you would have to start all over again.

Well with a simple command you can at least get the files which were completely downloaded with this command:

zip -FF Corrupted.zip --out New.zip
and now you can extract em, good luck!


INSTALLING A .deb FILE FROM COMMAND PROMPT


sudo dpkg -i "file"

CHECKING YOUR FORMATTED DISK SPACE

df -h

RUNNING A COMMAND AS ANOTHER USER (SOURCE)

sudo -H -u otheruser bash -c 'echo "I am $USER, with uid $UID"' 

No comments:

Post a Comment