Pages

Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Tuesday, February 9, 2016

Writing linux command output to file

In case you want to write the output of a command in linux terminal in text file, type the command as follows: Here I am giving an example of 'ls' command

ls > filename.txt

Sunday, February 7, 2016

Zip folder without compression on linux terminal

I used the following command:

zip -r -0 projects_7Feb16.zip projects/

This created zip file named  'projects_7Feb16.zip'  of the folder named as "projects" in the current working directory (cwd)

Note: My current working direcotory was a folder where "projects" folder was situated. One needs to give full path of the folder if cwd is different.