answersLogoWhite

0


Best Answer

ls /this/dir/path > dirfile

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a Linux command to print the content of a given directory to a given file?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Write the Linux command to display the information about LS command?

Using man ls will open the manual page for the ls command. The ls command lists the files and folders in the current directory.


In what directory should you write device driver programs in OpenSUSE Linux?

You can write them in whatever directory you want. You need to compile them with your kernel, however.


How do you write a Linux function that will go to any directory then ls and pwd on it?

WHAT I NEED DONE in .bash_profile define a function go_show, that willGo to a specific directoryPrint your current locationPrint the contents of your current directoryThe directory this function takes you to will be specified as an argument to the function on the command line. You will need to use a positional parameter to do this


Write command to show all files and directories?

If you want everything, start at the root directory and issue the command: ls -R


Ignou mca 2nd semester solved assignment?

write the Linux command for the following: 1) to display yhe information about Is command i need assignments


Write the command that will allow to configure the networking card using a command line utility?

In Linux, you can configure a network card (it;s IP address, and if it is turned on or off) with the 'ifconfig' command.


What is dcpromo?

dcpromo is command u have to write it in Run to create a new domain controller and create active directory


What does the tee command do in Linux?

This example of a tee command: $ ls | tee test_1 will write the result of ls (show files in current directory) on the computer screen, and will also write the result into a text file in the home directory named test_1. Use something like $ ls -l | tee -a test_1 to add a second list without over-writing the first list. Note: without -a the second list would simply overwrite the first list. With -a the second list is appended to the end of the first list.


A Java Program to choose directory and search file name content file name and content must both enter It will list out the result and when click on the result it will show the content?

write a program of phone dirictory


Which command is used to create an empty file with file size zero bytes so that you can write in these files later in unix and Linux?

touch newfile will make a new empty file in linux os !


What are file permissions in Linux?

The typical way to view file permissions is to use the 'ls' command with the long listing options enabled, For example, to see the file permissions for everything in the current directory, type: ls -lsa


How can you add two numbers in Linux?

There are calculator applications for the command line (bc), GUI (depends on your desktop UI), and also available if you write code or scripts.