Questions tagged [files]

For questions concerning specifics about the files on Ubuntu. If your question is about the file manager called "Files" in Ubuntu, use the [nautilus] tag instead.

In Linux "everything is a file" (unless it's a process) but files come in different types, most commonly "regular" files, directories (lists of files) and links (to other files). Executable binaries and scripts, text and media files are all regular files.

Types of files with symbols as in the output of ls -l:

Symbol  Meaning

-       Regular file
d       Directory
l       Symbolic link
b       Block device
c       Character device
s       Socket
p       Named pipe

Each file is linked to a numbered inode that stores metadata about it:

  • File type
  • Owner id and group id
  • Mode: permissions for owner, group and others
  • Timestamps of when the file was last accessed and when the inode and file were last changed
  • The number of links to the inode
  • The file's size
  • An address pointing to the blocks where data in the file is located
2849 questions
268
votes
2 answers

How to rename a file in Terminal?

I have: /home/user/my_static /home/user/static/ How do I rename my_static to static and remove static(2)?
user2054574
  • 2,791
116
votes
6 answers

How to move all files in current folder to subfolder?

I am at the path: /myuser/downloads/ And I create a sub folder: /myuser/downloads/new Now I want to move all files and folders/sub-folders in the downloads folder to the sub-folder. how can I do this? I tried: mv -R *.* new/ But move doesn't take…
Blankman
  • 8,275
82
votes
8 answers

How can I open a file in my terminal, like nautilus does it?

I want to be able to open files like my operating system does from console. e.g. a .pdf file should be opened with evince or whatever the default application to open pdfs is. All the other things should work too; images -> eog, text files -> gedit…
David Halter
  • 1,013
50
votes
6 answers

How do I solve "Error splicing files?"

My hard drive crashed, so I'm using a Ubuntu live disk to access my files. But as I try to transfer them to my flash drive, it occasionally comes up with an error message which, when I view details, says: Error splicing file: Input/output…
Pistos
  • 501
  • 1
  • 4
  • 3
19
votes
1 answer

A big core dump appeared in my home folder - what is it and how can I delete it?

A large x-core file with name core appeared in my home directory. I don't know what it is and what to do with it. I can't upload the core dump because when I tried to copy it somewhere, I couldn't even open it because it is so big. I'd still…
17
votes
3 answers

Copy dialogue freezes at 0 seconds forever when copying to a USB flash drive

Copy dialogue freezes at 0 seconds forever and I end up with a corrupt file for files bigger than 1GB on a Dell Inspiron N4050 laptop (i3 with 4GB of RAM). The copying goes too fast at the beginning than it hangs at the very end like forever. FYI:…
Utnapishtim Linux
  • 517
  • 3
  • 7
  • 18
16
votes
6 answers

How can I protect a file from user changes?

I am using Ubuntu 12.04 and I want to protect some pictures of another user using the su command (I have admin privileges). How can I protect a file using the terminal while still allowing the rest of the users to read it?
Jatttt
  • 2,327
  • 12
  • 32
  • 43
13
votes
4 answers

mv: cannot stat with *

I've tried this before. I swear I was able to issue this kind of command before: mv /home/user/temp1/* /home/user/temp2 Basically, I got this command from here: https://superuser.com/questions/273254/move-files-and-folders-recursively-in-linux Any…
user1012451
  • 3,135
11
votes
1 answer

How to avoid the change of timestamp of files when moving then from directory

When I move files from one directory to another, the timestamp of the files changes. For example, if the file was created with a date 2013-01-01, when I move it to a different directory, the final file will have the date of the move, not of the…
Kaf
  • 1,255
10
votes
2 answers

How can I read and edit files from Apple iWork (Keynote, Pages)?

How can I save and read files from Apple's office suite, iWork? It includes applications like Keynote (for presentations), Pages (word processing), etc.
Jorge Pinho
  • 1,228
7
votes
6 answers

Change multiple filenames by replacing commas and whitespaces with underscores

My files are of the format Country, City S1.txt e.g. USA, Los Angeles S1.txt USA, San Francisco S3.txt UK, Glouchester S4.txt Argentina, Buenos Aires S7.txt I wish to change them…
alien.on.earth
  • 151
  • 2
  • 7
6
votes
8 answers

".ts " files not recognised

I have some .ts files (programs recorded from my Sharp TV on USB stick) that I want to store/play on my PC. However, although they are listed on the stick when its plugged in the PC nothing will recognize the files. I have tried VLC (the "slider"…
5
votes
1 answer

truncate all files recursively

can anybody give me a solution to enlarge all files of same extension by 264 bytes on entire hard disk? truncate -s +264 /*encrypted would enlarge all *.encrypted files by 264 bytes but only in one directory. I want it to do the subfolders as well
5
votes
2 answers

How to automatically delete a file at a specific time after closing it?

I am using Ubuntu 12.04 and I am here to know: is there any way to limit the life time of a file? I mean, for example, I have created a file that has to be automatically deleted 10 minutes after I close it. Is there any way to do it?
Raja G
  • 102,391
  • 106
  • 255
  • 328
5
votes
1 answer

Remove "Undo Deleted" Popup in Ubuntu

Is there a way to remove the "Undo Deleted" popup in Files. I tried the answer provided for Nautilus however I could not find the directory/file to edit. Ubuntu 19.10 GNOME 3.34.2 Thanks
1
2 3
12 13