13 Answered Questions for the topic file

File Linux Bash

07/05/19

#### How to create a file in Linux from terminal window?

What's the easiest way to create a file in Linux terminal?
File Linux Editor

07/04/19

#### Convert DOS line endings to Linux line endings in vim?

If I open files I created in Windows, the lines all end with ^M. How do I delete these characters all at once?

06/27/19

#### Quickly create a large file on a Linux system?

How can I **quickly** create a large file on a Linux ([Red Hat Linux][1]) system? [dd][2] will do the job, but reading from /dev/zero and writing to the drive can take a long time when you need... more
File Python

06/18/19

#### How do I remove/delete a folder that is not empty with Python?

I am getting an 'access is denied' error when I attempt to delete a folder that is not empty. I used the following command in my attempt: os.remove("/folder_name"). What is the most effective way... more
File Linux Ubuntu

06/18/19

#### How to append one file to another in Ubuntu Linux?

I have two files: file1 and file2. How do I append the contents of file2 to file1 so that contents of file1 persist the process?
File Unix Newline

05/26/19

#### Why should text files end with a newline?

I assume everyone here is familiar with the adage that all text files should end with a newline. I've known of this "rule" for years but I've always wondered — why?
File Unix Bash

05/21/19

#### How to split a large text file into smaller files with equal number of lines?

I've got a large (by number of lines) plain text file that I'd like to split into smaller files, also by number of lines. So if my file has around 2M lines, I'd like to split it up into 10 files... more

05/14/19

#### Remove a symlink to a directory?

I have a symlink to an important directory. I want to get rid of that symlink, while keeping the directory behind it. I tried rm and get back rm: cannot remove 'foo'. I tried rmdir and got... more
File Unix Terminal

05/13/19

#### Copying files across computers using SSH and MAC OS X Terminal?

I'm trying to copy my .profile, .rvm and .ssh folders/files to a new computer and I know how to use the cp and ssh commands but I'm not sure how to use them in order to transfer files from one... more
File Linux Unix

04/20/19

#### How to get full path of a file?

Is there an easy way I can print the full path of file.txt ? file.txt = /nfs/an/disks/jj/home/dir/file.txt The <command> dir> <command> file.txt should print ... more
File Python Copy

04/14/19

#### How do I copy a file in Python?

How do I copy a file in Python?I couldn't find anything under [os](https://docs.python.org/2/library/os.html).
File Python String

04/04/19

#### How to read a file line-by-line into a list?

How do I read every line of a file in Python and store each line as an element in a list? I want to read the file line by line and append each line to the end of the list.
File Python Append

03/26/19

#### How do you append to a file in Python?

How do you append to the file instead of overwriting it? Is there a special function that appends to the file?

## Still looking for help? Get the right answer, fast.

Get a free answer to a quick problem.
Most questions answered within 4 hours.

#### OR

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.