UNIX Reminder

In order to zip all content of a folder use -r option

zip -r abc.zip 1/

Extract your files from a zip folder

unzip abc.zip

To extract to a specific directory use -d option

unzip abc.zip -d /tmp

The mv command can also be used to rename a file while leaving it in the same directory.

mv oldfilename newfilename

How to move all files from current directory to upper directory?

mv * .[^.]* ..

Change the ownership of the directory and all its contents recursively, with the -R option after unzipping

chown -R myuser:mygroup directory
Change default php version on ssh console

scl enable rh-php56 bash

Delete all directory content without promt
rm -Rf dirname/*

Remove/delete directory
rmdir dirname



 

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

Captcha Captcha Reload

This site uses Akismet to reduce spam. Learn how your comment data is processed.